Added logging. Solved performance issues.

string + string + string is bad.
stringbuilder.append() is gooooooood.