Repaced verifyDirectoryForExamples and scanDirectoryForExamples with scanDirectory using callbacks