refactor nodeArgs and nodeHostArgs to raise an exception