jsonex error handling improved