added a bit more logging