Implemented JSON schema validation for errors etc