<commit_before>const fs = require('fs-extra')
const chalk = require('chalk')

exports.log = (message, err) => {
  // Regular errors
  if (message instanceof Error) {
    console.error(err && err.stack)
    return
  }

  // Ability to add custom message to error
  if (err instanceof Error) {
    console.error(chalk.bold(message), err.stack)
    return
  }

  // The usual loggings
  console.log(message)
}

exports.exists = path => {
  try {
    fs.statSync(path)
    return true
  } catch (err) {
    return false
  }
}

exports.isSite = () => {
  const pkgPath = process.cwd() + '/package.json'

  if (!exports.exists(pkgPath) || !exports.exists(process.cwd() + '/.env')) {
    return false
  }

  // Load the package.json
  const package = require(pkgPath)

  // Check if muffin has been added to dependencies
  if (!package.dependencies || !package.dependencies.muffin) {
    return false
  }

  return true
}
<commit_msg>Put error stack in new line when logging<commit_after>const fs = require('fs-extra')
const chalk = require('chalk')

exports.log = (message, err) => {
  // Regular errors
  if (message instanceof Error) {
    console.error(err && err.stack)
    return
  }

  // Ability to add custom message to error
  if (err instanceof Error) {
    console.error(chalk.bold(message) + "\n", err.stack)
    return
  }

  // The usual loggings
  console.log(message)
}

exports.exists = path => {
  try {
    fs.statSync(path)
    return true
  } catch (err) {
    return false
  }
}

exports.isSite = () => {
  const pkgPath = process.cwd() + '/package.json'

  if (!exports.exists(pkgPath) || !exports.exists(process.cwd() + '/.env')) {
    return false
  }

  // Load the package.json
  const package = require(pkgPath)

  // Check if muffin has been added to dependencies
  if (!package.dependencies || !package.dependencies.muffin) {
    return false
  }

  return true
}

{'fraction_non_alphanumeric': 0.13665254237288135, 'fraction_numerical': 0.0, 'mean_word_length': 2.9272349272349274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4571878', 'n_tokens_mistral': 632, 'n_tokens_neox': 609, 'n_words': 164}