added a bit o logging