Adding more logging and timing work function.