add closed output channel to sink
reorg
loadfile/string now return an error code
doc fixes
explore stream-based decoding ideas