Rename string to msg and only print message if there is one