Improving log and debug with cmd string storage and toString.