Fixed writing compressed log files.