Script to wait for emulator