added shutdown hook
added 'stop file' for signaling "stop the app"