This static referencing is extremely scary and is hard to test.

May I suggest extracting an interface which contains the method isShuttingDown and dependency inject that?