More log handling fixes