Moved logging functions to dbg.h (tier0) and export them from the dll. Added additional functions for checking bad pointers (debug only!). Reduced output code size.