var fs = require("fs");
var glob = require("glob");

module.exports = function () {
	glob("/sys/bus/w1/devices/28*/w1_slave", function (er, files) {
		return new Promise(function (resolve, reject) {
			fs.readFile('/etc/hosts', 'utf8', function (err,data) {
				if (err) {
				return console.log(err);
				}
				console.log(data);
			});
			resolve([
				{
					sensorID: 4,
					value: latestTemp,
					unit: "&#176;C",
					measurement: "Temperature",
					location: "Soil",
					htmlDecimal: 1
				}
			]);
		});
	});
}
// im a bad programmer

@@ -199,32 +199,129 @@
 %0A%09%09%09
-fs.readFile('/etc/hosts'
+if (files.length %3C 1) %7B%0A%09%09%09%09reject(%22Device not found. Try starting up the kernel modules.%22);%0A%09%09%09%7D%0A%09%09%09fs.readFile(files%5B0%5D
 , 'u

Update ds18b20.js