If any party fails to comply with the order as modified on appeal by the court or the commissioner, and within the time fixed by either of them, then the officer is empowered to cause the building or premises to be repaired, torn down, demolished, materials removed and all dangerous conditions remedied, as the case may be, at the expense of the party or parties.