Added debug.c and debug.h files