NEXUS-6526 - wrap warn with log check and reformat affected code only