Fix broken IOError
Stop using ::tr1