Fixed clearing temp-file