changed simple "printf()" debug output to new debug log function