If, for any reason, this one fails, the temporary file will be left on disk, maybe check if that worked, and if not, delete the temp file.