Code for the less magic was unnecessarily reading the entire input file ...

...twice.  Redundant read removed.