Within five days after such election, inspectors shall report the result of the election to the judge of probate, who may enter an order confirming and approving the election and report, and, in that event, the officers shown by such report to have been elected shall, upon the recording of such order, be entitled to hold office until the next general municipal election and until their successors are elected and qualified. If any person fails to qualify within 30 days after he shall have been declared elected, the judge of probate may appoint some person to fill such vacancy.
The judge of probate may, for fraud or material irregularities, set either of such elections aside and order another election in like manner to be held by the same or other inspectors to be by him appointed.
The judge shall make a record of the proceedings in the matter of such incorporation and election of officers and file in the office of the Secretary of State a certified copy of the entry showing the result of the elections preceding. The costs of all the aforesaid proceedings shall be paid by the town or city; but, if no judgment is entered establishing the town or city, they shall be paid by the petitioners, and judgment shall be entered dismissing such proceedings.