add automatic regenerate to config file