improved logging to syslog and es