corrected order of keepFiles restoration