Shutdown task system on close