Enhance log message.
Fix quality flaws: possible Null Pointer Exception.