check_error_state logs itself