Build cmd in the constructor