lib: add 'close' in filter_stream