add before stop method feature

Change-Id: I097f7fc403c6f3f515436ce7a9b3b9f6f15c66ce
update before stop hook

Change-Id: I07fc2d2425f060c48cd276c0a9bae6a6239dcd27