Replaced Timer class and function with logging