add terminate_logging