change specific WindowsError to generic OSError