(a) A person who fails to exercise due diligence under a court order to abate a condition under ยง 20-306 or ยง 20-307 of this subtitle is guilty of a misdemeanor and on conviction is subject to:

(1) A fine not exceeding $1,000; and

(2) The cost of prosecution.

(b) A person who knowingly or willfully acts contrary to a court order to abate a condition under ยง 20-306 or ยง 20-307 of this subtitle is guilty of a misdemeanor and on conviction is subject to:

(1) A fine not exceeding $1,000; and

(2) The cost of prosecution.