Some optimization, show more information on shutdown