Making debug an optional attribute and changing existence test for it.