Added more logging to make debugging a little easier