auto flush the config