Modify io import statement for Python 3 compatibility