For ENG-5856, close the pipe when done