Shutdown on jvm closing, when not working from the CL
Better tailored to run without a command line