I/O primitives