Add check for cmd