We should raise ``OSError`` instead of ``ValueError``.