No fact officially stated by an officer in respect of a matter about which he is by law required to make a statement in writing, either in the form of a certificate, return or otherwise, shall be called in question, except in a direct proceeding against the officer or his sureties, or upon the allegation of fraud in the party benefited thereby or mistake on the part of the officer.