Adding more helpful error messages in record class