some log optimization