Update mainthreadio.py