EUCA-9156: for both registraiton and volume-based tasks, we check 'cancelled' and do necessary cleanups.
           The cleanups include killing process, closing open files, etc.