Fix wait_for_emulator script, set max fail counter to 8