Chunked sample - fixed ChunkedOutput to call close