changes to debug.h to work with syslog