Added logging to plugin