add on_shutdown event for plugins