Properly shut down