invoke shutdown() from destructor