more C++ like debug logging, removed harmful va_list