more encapsulation, unified debug/exception logging