bugfixes, pidfile, health and log changes