Add shutdown hook
Format