Check length of cmd