Fixed title of tab and directory file.
When the iteration is completed, the tab is closed.