I'm not certain about this, but should this `if` have a corresponding else section like this?
```python
else:
    raise
```
to re-raise the exception if the errno is something other than EIO?

The same question applies to the equivalent `if` in the next `except` block.