added root and path for finding files in directories