Fixes to log generation.