improve handling of config files

prevent overwriting of config files on upgrade