I would declare the `data` event listener before the `end` one.