properly throwErr if junk at end of line