better failure diagnostics in tests