I have added my own functions for debug 

I think that this is a good way to implement these debug prints.

The functions tell us the line and the file who have called them so the debug work becomes easier (which I think is the main purpose of this issue).

If you agree with me then I could try to improve it by defining more debug levels or doing anything we find interesting.

Right now we can compile it as: "make all CFLAGS+=-DDEBUG_LOW=1"  and the timeout message will be printed.
If we compile mist with: "make all" the timeout message will not be shown while executing mist
Yes, all the PRINTF behave the same. We do not need levels. 
If you always want to print something then use `printf`.
With `v=0` (the default value) `PRINTF` do not print anything but with all the other values (`v>0`) they do print something. We do not need more.