You're still not taking care of @peterflynn's comment for this call. Below is perter's comment I copied from the other pull request.

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.