Added test that checks if process is still running with shutdown command.
Now killing the server when all listening threads are gone.