added debug output to function loadClass()