In any such action, judgment may be rendered against the defendant and the property covered by the lien, or against either, for so much as is found due by virtue of the lien. If the amount due exceeds the amount so covered, then a separate execution shall be issued to the plaintiff against the defendant for such excess and the plaintiff may discontinue as to any defendant. The court may apportion costs as justice requires.
10 M.R.S. § 4010