Added wait for emulator script