<commit_before>const _ = require('lodash')
const got = require('got')
const fs = require('fs')
const path = require('path')

var config
try {
  config = JSON.parse(fs.readFileSync(path.resolve('oh-my-cdn.json')))
} catch (err) {
  console.error(err)
  process.exit(1)
}
console.log('Oh My CDN is fetching your targets now...')

var directory = config.directory == null ? 'vendor' : config.directory
if (config.targets == null) {
  console.log('No targets to fetch.')
  process.exit(0)
}
var targets = config.targets
try {
  fs.mkdirSync(path.resolve(directory))
} catch (err) {
  if (err.code !== 'EEXIST') {
    throw err
  }
}

var promises = []
_.forIn(targets, function fetchScripts (value, key) {
  var promise = new Promise((resolve, reject) => {
    var url, filename
    if (_.isString(value)) {
      url = value<commit_msg>show simple message rather than log error when config file does not found<commit_after>const _ = require('lodash')
const got = require('got')
const fs = require('fs')
const path = require('path')

var config
try {
  config = JSON.parse(fs.readFileSync(path.resolve('oh-my-cdn.json')))
} catch (err) {
  console.error('oh-my-cdn.json doesn\'t exist.')
  process.exit(1)
}
console.log('Oh My CDN is fetching your targets now...')

var directory = config.directory == null ? 'vendor' : config.directory
if (config.targets == null) {
  console.log('No targets to fetch.')
  process.exit(0)
}
var targets = config.targets
try {
  fs.mkdirSync(path.resolve(directory))
} catch (err) {
  if (err.code !== 'EEXIST') {
    throw err
  }
}

var promises = []
_.forIn(targets, function fetchScripts (value, key) {
  var promise = new Promise((resolve, reject) => {
    var url, filename
    if (_.isString(value)) {
      url = value
{'fraction_non_alphanumeric': 0.15612535612535614, 'fraction_numerical': 0.002279202279202279, 'mean_word_length': 3.932584269662921, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5020068', 'n_tokens_mistral': 593, 'n_tokens_neox': 579, 'n_words': 159}