Fixed small issue in null check.
Cleanup logger.
Changed thread name.
Tweaked thread attachment.