end stream on exit
2.1.2