Add flush directory method