Removed a global and made it a local to determine when to update the config file.