We should catch only ``OSError`` exceptions here.