Added more logging when doing things