Add explicit shutdown