Section 99. A person shall not have such right of action for labor performed, unless, within thirty days after ceasing to perform it, he files in the office of the clerk of a city or town where any of said labor was performed a written statement, on oath, of the amount of the debt so due him and of the name of the persons for whom and by whose employment the labor was performed and pays to said clerk the fee provided by clause (60) of section thirty-four of chapter two hundred and sixty-two. Such right of action shall not be lost by a mistake in stating the amount due; but the claimant shall not recover as damages a larger amount than is named in said statement as due to him, with interest thereon.