Perhaps this fixes the bug that causes lines to be corrupted in the log from time to time.