Implemented simple log file rotation.