remove unused variable

the variable was only used for a log message and it's not worth the
additional code complexity
removed dead code

this code had no effect except making the code look more complicated.
remove unused variable