Added DATESTAMP refresh into the loop (log time was not advancing).