It's not an error...I just forgot to add a (princ) to the end of the routine for a "clean" exit. I'd imagine the layer names that did not change end with the same text ie $xref1$walls, $xref2$walls, $xref3$walls and duplicate layer names are not allowed.