API 2 open file

I can’t seem to get the open file command to work in API 2. The code below was working fine in API 1 but no longer works. It shows the open file dialogue but when a file is selected nothing happens.

What needs to be changed to get files to open again, and is there a place where there is updated documentation for all the things that need to be changed to get API 1 code to work again?

async function openExistingTemplate() {

   const fs = require("uxp").storage.localFileSystem;
   const file = await fs.getFileForOpening();

   if (file) {
     await app.open(file);
  } else {

Needs to go behind executeAsModal – see https://www.adobe.io/photoshop/uxp/2022/ps_reference/media/executeasmodal/