(1) An inspector or authorised officer may give a person a written direction to rectify a breach of a mandatory code if the inspector or authorised officer believes on reasonable grounds that—
(a) the person is in breach of a requirement of the code; and
(b) the person has not previously been convicted, or found guilty, of an offence under section 24A or section 24B for failing to comply with a requirement of the code.
(2) A direction must—
(a) state the requirement of the code that has been breached and the conduct constituting the breach; and
(b) if appropriate, state what must be done to rectify the breach and, if reasonable, who must do it; and
(c) state a reasonable time within which the person must give the inspector or authorised officer evidence that the direction has been complied with; and
(d) include a statement that the person may be prosecuted under section 24B or section 24D if the person fails to comply with the direction.
(3) The inspector or authorised officer may withdraw a written direction if, after giving the direction to a person, the inspector or authorised officer discovers that the person has previously been convicted, or found guilty, of an offence under section 24A or section 24B.