If the order is affirmed by the verdict, the board shall recover costs to the use of the town; if it is annulled and the petitioner has not been specially authorized by said board to exercise such trade or employment during the proceedings, he shall recover damages and costs against the town; if it is annulled and the petitioner has been specially authorized as aforesaid, or if it is altered, he shall not recover damages, and the court may render judgment for costs in its discretion.
Mass. Gen. Laws ch. 111, § 150