Fix log truncating issue