improved error handling when parsing json data
send back error in docall in json
added \n when printing some message