call stream.end() when destroying