<commit_before>(function () {
	'use strict';

	var fs = require('fs'),
		path = require('path'),
		crc32 = require('../lib/crc32'),
		name = (process.argv[1].indexOf(__filename) < 0 ? '' : 'node ') + path.basename(process.argv[1]),
		usage = [
			'Usage:',
			'',
			name + ' file1.txt [, file2.txt...]'
		].join('\n'),
		files;

	if (process.argv.length === 2) {
		console.log(usage);
		return;
	}

	files = process.argv.slice(2);

	files.forEach(function (file) {
		var data = fs.readFileSync(file, 'utf8');

		console.log(file, crc32(data));
	});
}());<commit_msg>Added some error handling to runner<commit_after>#!/usr/bin/env node
(function () {
	'use strict';

	var fs = require('fs'),
		path = require('path'),
		crc32 = require('../lib/crc32'),
		name = (process.argv[1].indexOf(__filename) < 0 ? '' : 'node ') + path.basename(process.argv[1]),
		usage = [
			'Usage:',
			'',
			name + ' file1.txt [, file2.txt...]'
		].join('\n'),
		files;

	if (process.argv.length === 2) {
		console.log(usage);
		return;
	}

	// get just the files
	files = process.argv.slice(2);

	files.forEach(function (file) {
		var data;

		try {
			data = fs.readFileSync(file, 'utf8');
			console.log(file + ':', crc32(data));
		} catch (e) {
			console.error('Error reading file:', file);
		}
	});
}());
{'fraction_non_alphanumeric': 0.22635658914728682, 'fraction_numerical': 0.021705426356589147, 'mean_word_length': 3.317725752508361, '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': '1943842', 'n_tokens_mistral': 551, 'n_tokens_neox': 488, 'n_words': 93}