[task] import: improve restart logic