Get rid of the temp file when completed successfully.