Safe shut down BBB routine