When exporting a JPEG embedded in a raw and then reading back in a file of selected file names generated by an external app, the file names won't match the original because the extensions are different. I suggest that you accept file names like:
MJR_20110201_1234.*
in the text file to indicate that the extension should not participate in the match. (In general, it's difficult or impossible for the external app to guess the extension.)