Tweak shutdown
Move pre start hook to more appropriate place