added ability to change level
added a json schema so that malformed json doesnt crush the server