added debug option, and syslog information