KCC: Debugging changes -- including DEBUG_FN() function