Oops, it should be an OSError instead of IOError