Code automatically deletes temp file