moved debugging functions to external DLL written in C