Rewrite the config file