The costs incurred by the appeal may be allowed to either party by the court or justice before whom such appeal is heard, and they may be added to or deducted from the costs awarded in the principal action or may be collected upon a separate execution.
Mass. Gen. Laws ch. 261, § 22