Made PrintToLog() a bit safer & cleaner.
(It's now no longer limited to 495 character strings,
and it doesn't perform an extra conversion from char[] to std::string)