added try/catch to generate messages in the event of a json parsing error