adding pre and post restart hooks