Check if shutdown exists

Fixes #239, #237
Not available in L5..