Improve reporting

Make Logger, UsageReport and exception reporting more thread safe. For details see commit messages.
This change does not seem to have anything to do with thread safety (though it looks good)