added aws shutdown hook option