Added more debug logging