logging now Thread-Safe, files cleared

earlier files weren't truncated (size set to 0) before overwriting,
which left some thrash (old file content) at the end of the file
xsl examples created/updated