added debugLog function