Fixed issue with log file rotation