'Save progress, clean up files, and emit plugin event.'

def finalize(self, session):

    if session.want_resume:
        self.save_progress()
    if session.config['incremental']:
        self.save_history()
    self.cleanup(copy=session.config['copy'], delete=session.config['delete'], move=session.config['move'])
    if (not self.skip):
        self._emit_imported(session.lib)
