use configurable timeout for shutdown