Added debug messages for each step