Added debug statement for total time taken