Modified code to take into account that the updates are NOT precise and vary from update period to update period.  This is the problem with trying to "record" a live session and depend on other processes to pass along control.  There is a debug array that does not get written out unless the file write gets commented out.  The debug array contains information regarding timing and delays.  I hope there is a better way of doing this in the future.