added shutdown hook
Merge remote-tracking branch 'origin/master'