Update ioapi.cpp