Handle stream pipe better