even though you have a solution here, I'd still like to try and debug it. (the info above is no help)
Question for you though: are you trying to scan a full rom set? If so, there really is no need to do such a thing.
the rom scan tool is where you turn to when you have say, 40-400 roms that you've culled from a full rom set that you have on your machine.
You scan those roms against the input XML file, and romlister discards any game entry in the XML that does not match a physical file.
when it is done, you now have an XML file that matches your smaller collection of roms. You can then output that list to another format for example, which is how people can move from one FE to another without losing their game list.
if you're scanning against a complete rom set, then all you're doing is spending a lot of time and energy re-creating a full XML file.
Does that make sense?