Modified Client to close Stream instance in "end" event callback