v: handle errors better