Added a bool to allow shutting down of the system through the bool