Deleting useless files causing errors