Index: applications/editors/josm/plugins/globalsat/src/org/kaintoch/gps/globalsat/dg100/Dg100Config.java
===================================================================
--- applications/editors/josm/plugins/globalsat/src/org/kaintoch/gps/globalsat/dg100/Dg100Config.java	(revision 30737)
+++ applications/editors/josm/plugins/globalsat/src/org/kaintoch/gps/globalsat/dg100/Dg100Config.java	(revision 30738)
@@ -11,4 +11,6 @@
 import java.nio.ByteBuffer;
 import java.util.Properties;
+
+import org.openstreetmap.josm.Main;
 
 /**
@@ -107,5 +109,6 @@
     }
 
-    public String toString()
+    @Override
+	public String toString()
     {
         return
@@ -459,39 +462,21 @@
         props.setProperty(propUnk3, "" + unk3);
         props.setProperty(propUnk4, "" + unk4);
-        OutputStream os = null;
-        try
-        {
-            os = new FileOutputStream(fName);
+
+        try (OutputStream os = new FileOutputStream(fName)) {
             props.store(os, "dg100 config");
-        }
-        catch (Exception ex)
-        {
-            ex.printStackTrace();
+        } catch (Exception ex) {
+            Main.error(ex);
             throw ex;
         }
-        finally
-        {
-            if (os != null) {os.close();}
-        }
-    }
-
-    public void readProps(String fName)
-        throws Exception
-    {
+    }
+
+    public void readProps(String fName) throws Exception {
         Properties props = new Properties();
-        InputStream is = null;
-        try
-        {
-            is = new FileInputStream(fName);
+
+        try (InputStream is = new FileInputStream(fName)) {
             props.load(is);
-        }
-        catch (Exception ex)
-        {
-            ex.printStackTrace();
+        } catch (Exception ex) {
+            Main.error(ex);;
             throw ex;
-        }
-        finally
-        {
-            if (is != null) {is.close();}
         }
         logFormat = Byte.parseByte(props.getProperty(propLogFormat, "2"));
