Safely handle closing an already closed WindowedFile