Wait for VM ends before exiting the simulator