Correctly log cmd string.