Fixed log rotation, and time formatting