wait for emulator before script