Releasing file handles so that the windows delete works