moved to use RewriteConfig instead of WriteConfig