Update code comments and add log warning to help debug