If any supposed trustee serves within the time required therefor a disclosure under oath declaring that at the time of the service of the trustee process upon him he had no goods, effects or credits of the principal in his possession and submitting himself to an examination, on oath, he is entitled to his costs as in civil actions where issue is joined for trial. If adjudged a trustee, he may deduct his costs from the goods, effects and credits in his hands and he shall be chargeable for the balance only to be paid on the execution. If such goods, effects and credits are not of sufficient value to discharge the costs taxed in his favor, he shall have judgment and execution against the plaintiff for the balance of such costs, after deducting the sum disclosed, in the same manner as if he had been discharged.
14 M.R.S. § 2902