Directly replace the config file without deleting it