<commit_before>var pathMapper = require(__dirname + "/../pathMapper"),
    Path = require("path"),
    fs = require("fs");

module.exports = function(node, context, callback) {

    var config = context.config,
        baseUri = config.baseUri,
        path = node.getAttribute("path"),
        file, found = false;

    var paths = pathMapper(path, context, Object.keys(config.handlers));

    for (var i = 0; i < paths.length; i++) {
        file = Path.join(baseUri, "includes", paths[i]);
        if (fs.existsSync(file)) {
            found = true;
            break;
        }
    }

    if (!found) {
        callback && callback("Include file not found " + path);
        return;
    }

    fs.readFile(file, "utf8", callback);

};<commit_msg>added enableFallback attribute for Include ..<commit_after>var pathMapper = require(__dirname + "/../pathMapper"),
    Path = require("path"),
    fs = require("fs");

module.exports = function (node, context, callback) {

    var config = context.config,
        baseUri = config.baseUri,
        path = node.getAttribute("path"),
        enableFallback = node.getAttribute("enableFallback") != "false",
        file, found = false;

    var paths = pathMapper(path, context, Object.keys(config.handlers), enableFallback);


    for (var i = 0; i < paths.length; i++) {
        file = Path.join(baseUri, "includes", paths[i]);
        if (fs.existsSync(file)) {
            found = true;
            break;
        }
    }

    if (!found) {
        console.log("WARN: Couldn't find included file " + file);
        callback && callback(null, "");
        return;
    }

    fs.readFile(file, "utf8", callback);

};
{'fraction_non_alphanumeric': 0.15176964607078583, 'fraction_numerical': 0.0023995200959808036, 'mean_word_length': 2.439175257731959, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4467834', 'n_tokens_mistral': 498, 'n_tokens_neox': 486, 'n_words': 122}