cleanup log output
cleanup log output
short-circuit if already done