Fixes to log outputting