improved restoring of cache dir