Harmonize OSError handling.