Fixed a problem where non existant files would be deleted