Index: src/uk/me/parabola/imgfmt/app/FileBackedImgFileWriter.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/FileBackedImgFileWriter.java	(revision 4651)
+++ src/uk/me/parabola/imgfmt/app/FileBackedImgFileWriter.java	(working copy)
@@ -24,6 +24,7 @@
 import uk.me.parabola.imgfmt.Sized;
 import uk.me.parabola.imgfmt.fs.ImgChannel;
 import uk.me.parabola.imgfmt.sys.FileLink;
+import uk.me.parabola.log.Logger;
 
 /**
  * Write img file data to a temporary file. On a call to sync() the data
@@ -70,7 +71,7 @@
 			channel.transferTo(0, channel.size(), outputChan);
 		} finally {
 			if (!tmpFile.delete())
-				System.err.println("could not delete temporary file " + tmpFile.getPath());
+				Logger.defaultLogger.error("could not delete temporary file " + tmpFile.getPath());
 		}
 	}
 
Index: src/uk/me/parabola/imgfmt/app/lbl/LBLFileReader.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/lbl/LBLFileReader.java	(revision 4651)
+++ src/uk/me/parabola/imgfmt/app/lbl/LBLFileReader.java	(working copy)
@@ -29,6 +29,7 @@
 import uk.me.parabola.imgfmt.app.labelenc.DecodedText;
 import uk.me.parabola.imgfmt.app.trergn.Subdivision;
 import uk.me.parabola.imgfmt.fs.ImgChannel;
+import uk.me.parabola.log.Logger;
 
 import static uk.me.parabola.imgfmt.app.Label.NULL_LABEL;
 
@@ -444,7 +445,7 @@
 			}
 
 			if (hasTides) {
-				System.out.println("Map has tide prediction, please implement!");
+				Logger.defaultLogger.error("Map has tide prediction, please implement!");
 			}
 
 			pois.put(poiOffset, poi);
Index: src/uk/me/parabola/imgfmt/app/mdr/MDRFile.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/mdr/MDRFile.java	(revision 4651)
+++ src/uk/me/parabola/imgfmt/app/mdr/MDRFile.java	(working copy)
@@ -28,6 +28,7 @@
 import uk.me.parabola.imgfmt.app.srt.Sort;
 import uk.me.parabola.imgfmt.app.trergn.Point;
 import uk.me.parabola.imgfmt.fs.ImgChannel;
+import uk.me.parabola.log.Logger;
 
 /**
  * The MDR file.  This is embedded into a .img file, either its own
@@ -150,7 +151,7 @@
 		Sort sort = mdrHeader.getSort();
 
 		if (sort.getCodepage() != codePage)
-			System.err.println("WARNING: input files have different code pages");
+			Logger.defaultLogger.warn("Input files have different code pages");
 	}
 
 	public Mdr14Record addCountry(Country country) {
Index: src/uk/me/parabola/imgfmt/app/net/NumberStyle.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/net/NumberStyle.java	(revision 4651)
+++ src/uk/me/parabola/imgfmt/app/net/NumberStyle.java	(working copy)
@@ -1,5 +1,7 @@
 package uk.me.parabola.imgfmt.app.net;
 
+import uk.me.parabola.log.Logger;
+
 /**
  * The number style down one side of a side of a road.
  *
@@ -63,7 +65,7 @@
 		case 'O': return ODD;
 		case 'B': return BOTH;
 		case '0':
-			System.err.println("zero instead of capital O in number spec");
+			Logger.defaultLogger.error("zero instead of capital O in number spec");
 			return ODD;
 		default: return NONE;
 		}
Index: src/uk/me/parabola/imgfmt/mdxfmt/MdxFile.java
===================================================================
--- src/uk/me/parabola/imgfmt/mdxfmt/MdxFile.java	(revision 4651)
+++ src/uk/me/parabola/imgfmt/mdxfmt/MdxFile.java	(working copy)
@@ -23,6 +23,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import uk.me.parabola.log.Logger;
+
 /**
  * The MDX index file.  Used with the global index.  This is located
  * at the family level in the windows registry and can perhaps index
@@ -103,7 +105,7 @@
 			// Although its not necessarily wrong for them to be zero, it probably
 			// sign that something is wrong.
 			if (info.getHexMapname() == 0 || info.getMapname() == 0)
-				System.err.println("Invalid mapname for " + info.getFilename() + ", perhaps it is not a .img file");
+				Logger.defaultLogger.warn("Invalid mapname for " + info.getFilename() + ", perhaps it is not a .img file");
 
 			buf.compact();
 			info.write(buf);
Index: src/uk/me/parabola/imgfmt/Utils.java
===================================================================
--- src/uk/me/parabola/imgfmt/Utils.java	(revision 4651)
+++ src/uk/me/parabola/imgfmt/Utils.java	(working copy)
@@ -31,6 +31,7 @@
 
 import uk.me.parabola.imgfmt.app.Coord;
 import uk.me.parabola.imgfmt.app.ImgFileWriter;
+import uk.me.parabola.log.Logger;
 /**
  * Some miscellaneous functions that are used within the .img code.
  *
@@ -189,7 +190,7 @@
 			try {
 				f.close();
 			} catch (IOException e) {
-				e.printStackTrace();
+				Logger.defaultLogger.error("Error closing file", e);
 			}
 		}
 	}
Index: src/uk/me/parabola/mkgmap/build/LocatorConfig.java
===================================================================
--- src/uk/me/parabola/mkgmap/build/LocatorConfig.java	(revision 4651)
+++ src/uk/me/parabola/mkgmap/build/LocatorConfig.java	(working copy)
@@ -180,13 +180,12 @@
 			}
 			else
 			{
-				System.out.println(fileName + "contains invalid root tag " + rootNode.getNodeName());
+				log.error(fileName + "contains invalid root tag " + rootNode.getNodeName());
 			}
-   	}
+		}
 		catch (Exception ex)
 		{
-			ex.printStackTrace();
-			//System.out.println("Something is wrong here");
+			Logger.defaultLogger.error("Unexpected error reading " + fileName, ex);
 		}
   	}
 
Index: src/uk/me/parabola/mkgmap/combiners/FileInfo.java
===================================================================
--- src/uk/me/parabola/mkgmap/combiners/FileInfo.java	(revision 4651)
+++ src/uk/me/parabola/mkgmap/combiners/FileInfo.java	(working copy)
@@ -205,7 +205,7 @@
 			fr.position(0x15);
 			info.setCodePage(fr.get2u());
 		} catch (IOException e) {
-			e.printStackTrace();
+			Logger.defaultLogger.error("Unexpected error reading " + filename, e);
 		}
 	}
 
Index: src/uk/me/parabola/mkgmap/combiners/NsisBuilder.java
===================================================================
--- src/uk/me/parabola/mkgmap/combiners/NsisBuilder.java	(revision 4651)
+++ src/uk/me/parabola/mkgmap/combiners/NsisBuilder.java	(working copy)
@@ -27,6 +27,7 @@
 import java.util.Map;
 
 import uk.me.parabola.imgfmt.Utils;
+import uk.me.parabola.log.Logger;
 import uk.me.parabola.mkgmap.CommandArgs;
 import uk.me.parabola.mkgmap.Version;
 
@@ -95,7 +96,7 @@
 		} catch (Exception ex) {
 			inStream = this.getClass().getResourceAsStream("/installer/installer_template.nsi");
 			if (inStream == null) {
-				System.err.println("Could not find the installer template.");
+				Logger.defaultLogger.error("Could not find the installer template.");
 				return;
 			}
 		}
@@ -118,7 +119,7 @@
 			}
 
 		} catch (IOException e) {
-			System.err.println("Could not write NSIS file");
+			Logger.defaultLogger.error("Could not write NSIS file");
 		} finally {
 			Utils.closeFile(inStream);
 		}
@@ -182,7 +183,7 @@
 		} catch (Exception ex) {
 			inStream = this.getClass().getResourceAsStream("/installer/license_template.txt");
 			if (inStream == null) {
-				System.err.println("Could not find the license template.");
+				Logger.defaultLogger.error("Could not find the license template.");
 				return;
 			}
 		}
@@ -198,7 +199,7 @@
 			}
 
 		} catch (IOException e) {
-			System.err.println("Could not write license file");
+			Logger.defaultLogger.error("Could not write license file");
 		} finally {
 			Utils.closeFile(inStream);
 		}
Index: src/uk/me/parabola/mkgmap/combiners/OverviewBuilder.java
===================================================================
--- src/uk/me/parabola/mkgmap/combiners/OverviewBuilder.java	(revision 4651)
+++ src/uk/me/parabola/mkgmap/combiners/OverviewBuilder.java	(working copy)
@@ -215,7 +215,7 @@
 			codepage = finfo.getCodePage();
 		} 
 		if (codepage != finfo.getCodePage()){
-			System.err.println("WARNING: input file " + filename + " has different code page " + finfo.getCodePage());
+			Logger.defaultLogger.warn("Input file " + filename + " has different code page " + finfo.getCodePage());
 		}
 
 		try {
@@ -225,7 +225,7 @@
 				encodingType = mapReader.getEncodingType();
 			} 
 			if (encodingType != mapReader.getEncodingType()){
-				System.err.println("WARNING: input file " + filename + " has different charset type " + encodingType);
+				Logger.defaultLogger.warn("Input file " + filename + " has different charset type " + encodingType);
 			}
 
 			String[] msgs = mapReader.getCopyrights();
@@ -324,7 +324,6 @@
 			int min = levels[l].getLevel();
 			int res = levels[l].getResolution();
 			List<Polyline> lineList = mapReader.linesForLevel(min);
-			//System.out.println(lineList.size() + " lines in lowest resolution " + levels[1].getResolution());
 			for (Polyline line : lineList) {
 				if (log.isDebugEnabled())
 					log.debug("got line", line);
