Move emulator management to before script