Made iofd not global anymore.