Adding isFile to avoid trying to scan directories