better error messages for readVarBytes