catches any exception now in order to remove the temporary file