flow: add finalizers for generic streams
flow: add finalizer wrappers for other stream modes
flow: automatically close files when we get to the end of the associated streams.