elaborated on the json test
log client exception so its easier to debug
some error logging