Updated shutdown script