Added the utility file with scanDirectory function