bug fix and added logging of kernel computation
extra logging