Added more logging and debug

Added more logging and debug