fixed & added some more logging