Now also flushing remaining changes after run has completed