Use io instead of codecs