Please fix variable name 'agrs':
  hostList = open(args.file).readlines()