fix bug when a file deleted, issue #414