add service shutdown hooks