added catching exception in renameByMask