Added logging function to add timestamps.