it should the the opposite:
1) find potential candidates with FileEnumerator
2) check each candidate whether it fits as entry point

Could you please also check maybe we can just list all the possible values in a pattern parameter for  FileEnumerator, maybe we do not need the 2nd cycle at all.