output error message when model is invalid