more debugging in routines, also handle bad new attr