Updated main to use io.