More C++-like debugging

Gets rid of C-like va_list and FILE* handles and replaces it with normal C++ streams.