improved error reporting of model validation.