closes temp file (for testing if dir exists) and change of error message...

...s