Added hook to shutdown the shell, when UIConsole is closed via app-close
button click.