rewrite config file.