fixing log message
removed unused code