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
why should this C++ check?