adding debugging and syslog