Cast result to string before printing out log message.

This prevents raising an exception when debug mode is enabled and a measurement
succeeds.