Remove defer

On windows, a file open for writing may not be moved. We need to close the file once we are done with it and moving it after.
Please leave this here, but also do the f.Close() below. This one should be here (as a defer) in case an error occurs.