Switch more to use IOException.