Some improvements to the virtual IO code