Clean up log rotation code