Remove duplicate code

Fix log message