remove obsolete flush_dir logic