Purpose of variances. After considering the record and, if it wishes, examining the premises, the Board of Appeals shall have the power, in granting an appellant relief, to vary or modify any provision of these regulations relating to the use, construction or alteration of buildings or other structures, or the use of land, so that the spirit of these regulations shall be observed, the public safety and welfare secured and substantial justice done.