delete the temporary file in the end