Migrate to C I/O