Adding raise_on_error to error_count