Improved make_io.py and built testcase for it