However, pipe registers for the same event so it can close the writeStream.