Extract function for restoring global config