Update: replace I/O routines