added console error on JSON parse failure