fixed recrusrive issue with nested directories