Fixup json_object_put calls, fix debug settings and logging