Support buffered + unbuffered I/O