Reimplement I/O library.