Use io.open instead of codecs.open