corrected syslog info, and added if / else logic