improve working directory and syslog