Validating and reporting errors to the log