More work on improving I/O routines