fix bug was deleting files