There are not only xmis in the queried folder, e.g., a "data.xml" file in a gold standard files folder produced by Ruta's Check Annotations View.
Java heap space.
Introduce a file name filter. This would also allow to query certain subsets of documents in folders, e.g., ".*\.xmi".