Adding real error trapping into the schema