Re-raise on both OSError and IOError.