sane handling of IOExceptions