better error reporting by adding error to assert(ok)