rewrorked logging to better get along with systemd