Inject flush automatically when transitioning from write config to read config or write config to read.