handle deep dir