Fixed bug: should use attributeName instead of componentName
Restructured debugging output