better debugging function
enable merlin completion wrt datalog
update code to use new debug function