Added DEBUGFNC macro
(Untested) RPT logging functions added