refactoring errors.
added extension point for logging to bigquery.