Magic frequently is finicky. Whether it’s a limited-scope divination (reading entrails only counts when an actual spell or ritual is involved) or a full Wish going awry, one can often not rely on the results of spellcasting to solve a problem. So, figure out to deal with things the mundane way… it will help when your wizard is out of spells or there is an antimagic field interfering.