Jerry,
I can confirm that your revised patch also eliminates the problems
with the saxs.inp test in xplor-nih. However, would it be possible for
you to add a test case for this fix regarding the trailing line missing
a newline? It would be nice to regression test this as the io code
changes over time.
Jack