Fix bug where Exception is raised if file is deleted in history.