Some string usage refactoring.

It is very bad idea to concatenate strings via '+'. Worst places are refactored.
ThreadSafe output
Some other trifles.