try to improve on-the-fly restoration related to #22
fix: directory restoration see #22