added message when json is invalid, to know what happened