add on exit listener to uploader and generator