This is a petition brought originally in a district court to vacate its judgment entered on December 4, 1931, pursuant to previous default, in favor of the respondent (hereafter called Sturtevant) in an action of contract wherein Sturtevant was plaintiff and the present petitioner (hereafter called the town) was defendant. In that action Sturtevant sought to recover the balance alleged to be due to it from the town on a contract for heating and ventilating equipment for a school house.
A petition to vacate judgment must be brought in the court in which was entered the judgment sought to be vacated. G. L. (Ter. Ed.) c. 250, § 14. Such petition is an original and independent proceeding. Maker v. Bouthier, 242 Mass. 20, 22. Since by compulsion of the statute and not by voluntary election the petition was filed in the District Court where the judgment was entered, appeal from action on the petition lay to the Superior Court. Lynn Gas & Electric Co. v. Creditors National Clearing House, 235 Mass. 114, 115.
There is nothing to the contention that.there is no jurisdiction to consider the case. The only point suggested in support of that view is that, because on December 18, 1931, motion to dismiss the proceedings and revoke supersedeas was allowed in the District Court, the proceeding was at an end. This point is without merit for the reason that, on December 24, 1931, order was made expunging the allowance of that motion from the record because entered by mistake. The case thus was reinstated for further appropriate proceedings. The power of courts to correct mistakes in their records is beyond question. Karrick v. Wetmore, 210 Mass. 578, 579. Randall v. Peerless Motor *276Car Co. 212 Mass. 352, 387. Everett-Morgan Co. v. Boyajian Pharmacy, 244 Mass. 460, 462. Barringer v. Northridge, 266 Mass. 315, 318. There is nothing in the case at bar to indicate that there was error in making this correction of its record by the District Court.
The petition as filed in the District Court was signed by “Daniel P. Day Treasurer.” Confessedly in conformity to a by-law of the town the petition should have been brought by the selectmen and not by the treasurer. The town in the Superior Court moved for leave to file a substitute petition curing the defect. Respecting this matter the trial judge filed an order of this tenor: “The question of the signature to the petition was not raised until requests for rulings were presented after the close of the evidence. The court thereupon ordered the case reopened. Further evidence was heard on the question of authority to bring and prosecute the petition and the defendant was given opportunity to introduce such further evidence as it desired. The motion is allowed.”
The court plainly was empowered to reopen the hearing and to receive further evidence. Waucantuck Mills v. Magee Carpet Co. 225 Mass. 31. The vote of the selectmen ratifying the action of the treasurer was not inadmissible. The petition as originally filed was not a nullity. On its face it was brought in the name of the town. It simply was signed by a town officer not authorized to that end. It became a proper subject for amendment. G. L. (Ter. Ed.) c. 231, §§ 51, 138. Pizer v. Hunt, 253 Mass. 321. Shapiro v. McCarthy, 279 Mass. 425. The case at bar on this point is different from Brooks v. Boston & Northern Street Railway, 211 Mass. 277. There was no error of law in the action taken by the trial judge and in denying the respondent’s requests for instructions on this branch of the case. Roselli v. Riseman, 280 Mass. 338.
It has been argued at length in behalf of Sturtevant to the effect that there was abuse of discretion on the part of the trial judge in allowing the petition to vacate judgment on the ground that the conduct of the attorney for the town in the original action of contract constituted “intelligent or *277intentional carelessness or laxity in the observance of established principles” and rules of court-and that therefore relief was barred. It relies upon cases like Russell v. Foley, 278 Mass. 145, 148, Alpert v. Mercury Publishing Co. 272 Mass. 43, 45, and Silverstein v. Daniel Russell Boiler Works, Inc. 268 Mass. 424. Those decisions are not here controlling. It is to be remembered that the main purpose of civil litigation is to do justice between the parties. A motion to vacate a judgment is not granted unless required by justice and the law. It is addressed to sound judicial discretion, the exercise of which is not ordinarily reviewed by this court. The question presented commonly is one of fact whether “under the rules of law and the established principles of practice, having regard to the rights and interests of all parties, justice and equity require” reexamination of the case by "a new trial. Scituate Water Co. v. Simmons, 167 Mass. 313, 314. Beserosky v. Mason, 269 Mass. 325. Manzi v. Carlson, 278 Mass. 267. Sweeney v. Morey & Co. Inc. 279 Mass. 495, 503. It would serve no useful purpose to examine the alleged shortcomings of the attorney in detail. It is enough to say that there was no reversible error of the trial judge on this aspect of the case.
It cannot be held rightly that the trial judge was in error because no meritorious defence to the action was shown. Mellet v. Swan, 269 Mass. 173. Lovell v. Lovell, 276 Mass. 10. There was evidence to the effect that the claim of Sturtevant against the town arose from a subcontract made with it by one who was the primary contractor with the town and not out of immediate contractual relations by it with the town, and that Sturtevant had filed no statement with officers of the town as prerequisite to establishing a direct obligation on the part of the town. If that evidence were believed, any obligation of the town to Sturtevant as such subcontractor rested upon strict compliance by the latter with G. L. (Ter. Ed.) c. 149, § 29, as to filing sworn statement of claim with the town clerk and filing in the Superior Court a petition to enforce the claim. Failure to take these steps would bar recovery. *278A. L. Smith Iron Works v. Maryland Casualty Co. 275 Mass. 74. Newbury v. Lincoln, 276 Mass. 445. It cannot be ruled in these circumstances that as matter of law the petition ought not to have been granted. Boston Electric Co. v. Cambridge, 163 Mass. 64.
All the arguments urged in behalf of Sturtevant have been considered but they need not be discussed in further detail. No reversible error is shown.
Exceptions overruled.