fix temporary file check