Index: trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 7852)
+++ trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 7853)
@@ -66,5 +66,5 @@
 
     protected File cacheFile = null;
-    boolean initialized = false;
+    protected boolean initialized = false;
 
     public static final long DEFAULT_MAXTIME = -1L;
@@ -178,5 +178,7 @@
                     throw new IOException(tr("Failed to open input stream for resource ''{0}''", name));
                 return is;
-            } else throw new IOException();
+            } else {
+                throw new IllegalStateException("No file found for something different from a resource: "+name);
+            }
         }
         return new FileInputStream(file);
@@ -189,5 +191,5 @@
      * @throws IOException when the resource with the given name could not be retrieved
      */
-    public File getFile() throws IOException {
+    public synchronized File getFile() throws IOException {
         if (initialized)
             return cacheFile;
