This completes asynchronously, and the old viewer isn't closed until it does -- so we'll be resolving the handleFileClose() promise early, before it's actually closed.  Should probably .pipe() this over to 'result', or just return the promise returned by doOpen() instead of ours.