extracted time utils from tasks, added more logging