simplify print uat function

also avoid a warning when -Wmaybe-uninitialized is activated