Sage 50 canada IMP import error line numbers

SUGGESTED

I have got our custom IMP file format working very well with all the info I've found on these forums. The one thing I am unable to figure out is how the line number of a failed detail corresponds to the IMP file. For example, I have "Line 126: Select Item or Account to match X:" and after finding the culprit <salinvoice> the 126 seems completely arbitrary. It lands on line ~1800 in the import file, and the 142nd invoice item. Can someone help me make sense of this so troubleshooting is quicker in the future? Thanks!