Fix logging to file.