Added mechanism for injecting extra shutdown cleanup action.