Printing to log every 5 seconds