diff --git a/exec/init-fidonet.js b/exec/init-fidonet.js
index 28f2c380ba2a2def1abff86078aedae39998a20c..9969b5ba29da519336a813a08d128fb8dfb542cc 100644
--- a/exec/init-fidonet.js
+++ b/exec/init-fidonet.js
@@ -251,6 +251,7 @@ function get_domain(zone)
 				continue;
 			if(typeof zones == 'number') {
 				if(zone == zones) {
+					file.close();
 					return netname;
 				}
 				continue;
@@ -258,6 +259,7 @@ function get_domain(zone)
 			zones = zones.split(',');
 			for(var j = 0; j < zones.length; j++) {
 				if(zone == zones[j]) {
+					file.close();
 					return netname;
 				}
 			}
@@ -265,6 +267,7 @@ function get_domain(zone)
 		file.close();
 		return result;
 	}
+	file.close();
 	return "";
 }
 
@@ -638,6 +641,7 @@ if(!msgs_ini.iniGetObject("grp:" + netname)
 			? (netname.toUpperCase() + "_") : network.areatag_prefix
 	});
 }
+msgs_ini.close();
 
 /*********************/
 /* DOWNLOAD ECHOLIST */
diff --git a/exec/load/cfglib.js b/exec/load/cfglib.js
index 08c42c8ccdfd5a7e7a69ddfb517c393227007796..dd4c97cf2fb2253f1579fd773c2ca6cdd5dd3311 100644
--- a/exec/load/cfglib.js
+++ b/exec/load/cfglib.js
@@ -19,6 +19,7 @@ function read_main_ini(filename)
 	obj.mqtt = f.iniGetObject("MQTT");
 	obj.module = f.iniGetObject("module");
 	obj.shell = read_sections(f, "shell:");
+	f.close();
 	return obj;
 }
 
@@ -33,6 +34,7 @@ function read_file_ini(filename)
 	obj.viewer = read_sections(f, "viewer:");
 	obj.tester = read_sections(f, "tester:");
 	obj.protocol = read_sections(f, "protocol:");
+	f.close();
 	return obj;
 }
 
@@ -69,6 +71,7 @@ function read_xtrn_ini(filename)
 			item.code = item.code.substring(i + 1);
 		}
 	}
+	f.close();
 	return obj;
 }
 
@@ -101,6 +104,7 @@ function write_xtrn_ini(filename, obj)
 	write_sections(f, obj.sec, "sec:");
 	write_sections(f, obj.prog, "prog:");
 	write_sections(f, obj.native, "native:");
+	f.close();
 	return true;
 }