Hi Douglas
see this thread:
I am not sure why you need to empty the file after it is closed - perhaps to free up memory?