Correct type conversion in log string