extracting an function to update the config files in a specific machine