Update kd_collect.sh

Fixed for loop