I/O lib tests and fixes