[FOLD] more error messages
[FOLD] better json checking