Add logging to plugin