Making our shutdown program run automatically