change printing method into syslog