I think you should be able to avoid crashing if passed a non-relmapper file. Make sure not to loop over more mappings than exist in the relmapper file of the given size.
I guess you should warn if the number of mappings is too large for the file's size. And then "cap" the number of mappings to the maximum possible number. -- Justin