Generalized I/O and headers