Fix .log file generation on Windows