log: fix crash caused by logging after CU analysis