Added shutdown trigger and UUID persistence