An action of replevin shall not be dismissed by reason of a defect in the form or substance of the bond taken therein, if the court is satisfied that such bond was intended in good faith as a compliance with the law requiring a bond to be taken before service of the writ and if the plaintiff, within such time and upon such terms as the court orders, files a new bond such as is required by law, approved by the court or in the manner provided in section fourteen.
Mass. Gen. Laws ch. 247, § 17