<commit_before>var config = require('config'),
    crypto = require('crypto'),
    fs     = require('fs'),
    Lazy   = require('lazy'),
    log    = require('./logger'),
    util   = require('util');

var users     = {},
    usersFile = (config.auth && config.auth.digestFile || ''),
    lastMtime = 0;

function usersFileChanged(done) {
    if (typeof done != 'function') {
        done = function() { };
    }
    fs.stat(usersFile, function(err, stats) {
        if (err) {
            return done(err);
        }
        if (!stats.isFile()) {
            return done(new Error(util.format(
                "File '%s' does not exist.", filename)));
        }
        if (stats.mtime != lastMtime) {
            lastMtime = stats.mtime;
            var newUsers = {};
            new Lazy(fs.createReadStream(usersFile))
                .lines<commit_msg>Be more helpful if users file is missing<commit_after>var config = require('config'),
    crypto = require('crypto'),
    fs     = require('fs'),
    Lazy   = require('lazy'),
    log    = require('./logger'),
    util   = require('util');

var users     = {},
    usersFile = (config.auth && config.auth.digestFile || '(filename missing)'),
    lastMtime = 0;

function usersFileChanged(done) {
    if (typeof done != 'function') {
        done = function() { };
    }
    fs.stat(usersFile, function(err, stats) {
        if (err) {
            return done(err);
        }
        if (!stats.isFile()) {
            return done(new Error(util.format(
                "File '%s' does not exist.", filename)));
        }
        if (stats.mtime != lastMtime) {
            lastMtime = stats.mtime;
            var newUsers = {};
            new Lazy(fs.createReadStream(usersFile))
                .lines
{'fraction_non_alphanumeric': 0.1520136131593874, 'fraction_numerical': 0.0011344299489506524, 'mean_word_length': 1.9449081803005008, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6558024', 'n_tokens_mistral': 518, 'n_tokens_neox': 509, 'n_words': 120}