however, there is one issue which I cannot see how I can resolve:

If you right click an open file tab, which I have to do to close (would prefer an X on the tab, personally), you are presented with this menu.
Having Delete on this menu is potentially dangerous, I recommend removing it. It seems unlikely you would want to delete a file which you have open anyway?