59Where a lien is discharged or vacated under section 30 or section 51 or when in an action judgment is given in favour of or against a claim for a lien, the judge may allow a reasonable amount for costs of drawing and registering the lien or for vacating the filing thereof.