use emitter to signal end of download