Add a wait() after the JVM terminate.
Unwrap a few statements from one line into multiple so they can be debugged.