Added debug functions to RTS libs