Update file logging to work on all OSs