Index: applications/editors/josm/plugins/opendata/util/opendata/ModuleListGenerator.java
===================================================================
--- applications/editors/josm/plugins/opendata/util/opendata/ModuleListGenerator.java	(revision 30340)
+++ applications/editors/josm/plugins/opendata/util/opendata/ModuleListGenerator.java	(revision 30738)
@@ -15,4 +15,6 @@
 import java.util.zip.ZipOutputStream;
 
+import org.openstreetmap.josm.Main;
+
 public class ModuleListGenerator {
 
@@ -26,7 +28,8 @@
 			baseDir = args[0];
 		}
-		try {
+		try (
 			BufferedWriter list = new BufferedWriter(new FileWriter(baseDir+"modules.txt"));
 			ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(baseDir+"modules-icons.zip"));
+		) {
 			for (File file : new File(baseDir+"dist").listFiles(new FilenameFilter() {
 				@Override
@@ -37,5 +40,5 @@
 				try {
 					String filename = file.getName();
-					System.out.println("Processing "+filename);
+					Main.info("Processing "+filename);
 					list.write(filename+";"+url+filename); list.newLine();
 					Manifest mf = new JarFile(file).getManifest();
@@ -77,5 +80,5 @@
 									}
 								} catch (IOException e) {
-									System.err.println("Cannot load Image-Icon: "+value.toString());
+									Main.error("Cannot load Image-Icon: "+value.toString());
 								} finally {
 									zip.closeEntry();
@@ -84,14 +87,11 @@
 						}
 					}
-					
+
 				} catch (IOException e) {
-					e.printStackTrace();
+				    Main.error(e);
 				}
 			}
-			System.out.println("Done");
-			zip.close();
-			list.close();
 		} catch (IOException e) {
-			e.printStackTrace();
+			Main.error(e);
 		}
 	}
