small fixes

remove dead code (class name cannot be null because StringBuilder.toString always return string).
fixing log message.