Clean up log handling.