added support for specifying logfile. defaulting to syslog