Close open file when opening a new one.

(With the Folder backend.)