Add logging; fix l[0] issue on -dev