How To Do Proper Shutdown