added error handling upon revert and save via minify fn