Logging testing and fixes. An eof does not work on the ofstream, thus a flag was added to the record to indicate the last data point.