Updated to log the time