Moved TIMESTAMP refresh to the log function.