Added logic to raise DeletingLocalError if it's going to delete local files