Fixed test where it did not fail as soon as IOException was found.