If a judgment for costs upon a nonsuit, discontinuance or dismissal remains unsatisfied, the court in which a subsequent action for the same cause is brought may order proceedings therein to be stayed until such costs have been paid, and may further order that the action be dismissed unless they are paid within a time fixed by the order.
Mass. Gen. Laws ch. 261, § 10