Added void *arg to I/O routines