enhance-jar: added basic support for graceful shutdown