Provide some functionality for closing streams.