public void saveCaveMaps() {
		synchronized (caveTex) {
			Coord rc = null;
			String sess = Utils.sessdate(System.currentTimeMillis());
			File outputfile = new File("cave/" + sess);
			try {
				Writer currentSessionFile = new FileWriter(
						"cave/currentsession.js");
				currentSessionFile.write("var currentSessionC = '" + sess
						+ "';\n");
				currentSessionFile.close();
			} catch (IOException e1) {
			}
			outputfile.mkdirs();
			for (Coord c : caveTex.keySet()) {
				if (rc == null) {
					rc = c;
				}
				TexI tex = (TexI) caveTex.get(c);
				c = c.sub(rc);
				String fileName = "tile_" + c.x + "_" + c.y;
				outputfile = new File("cave/" + sess + "/" + fileName + ".png");
				try {
					ImageIO.write(tex.back, "png", outputfile);
				} catch (IOException e) {
				}
			}
		}
	}