QS-3004 Close process input stream once it is written