Added control for shutdown and restart method