Fix wrong location of log message in plugin.

log logic in add_if_exist method in plugin always produces error.