* add on_before_stop event