Modified I/O function signatures and call points to add support for streams of structs