Fix for logging to disk not working on windows