Added in some logging if the file could not be renamed on Windows, but that does not seem to be the problem...