improved failure message logging in tests