Added debug in for loop