resolved compiler error compared nn with nullptr
changed log message