Shutdown mode and before hooks added