Create a system that will failsafe the settings. When opening up hub, create a backup file that keeps the settings and work with it only. Flush it periodically, and if something bad happens, restore from backup. Also at startup check if some backup isn't already there.