public boolean readFile() {
		DocumentBuilderFactory dbf = null;
		Document docu = null;

		try {
			dbf = DocumentBuilderFactory.newInstance();
			db = dbf.newDocumentBuilder();
			docu = db.parse(new File(fileName));

			Node root = docu.getDocumentElement();
			if (root.getNodeName().equalsIgnoreCase("system")) {
				readNode(root);
				
			} else {
				errorMsg="root node is not <system>";
				return false;
			}
		} catch (FactoryConfigurationError e) {
			errorMsg="DocumentBuilderFactory Configuration error:"+e.getMessage();
			//e.printStackTrace();
			return false;
		} catch (ParserConfigurationException e) {
			//e.printStackTrace();
			errorMsg="Parser Configuration error:"+e.getMessage();
			return false;
		} catch (SAXException e) {
			errorMsg="XML error:"+e.getMessage();
			//e.printStackTrace();
			return false;
		} catch (IOException e) {
			if( e instanceof FileNotFoundException) {
				errorMsg="Input file "+fileName+" is not founded";
			}
			else
			{
				errorMsg="I/O error:"+e.getMessage();
			}
			//e.printStackTrace();
			return false;
		} catch (Exception e) {
			if(e instanceof NumberFormatException) {
				errorMsg="CARTS XML tag value is not number:"+e.getMessage();
			}
			else
			{
				errorMsg="CARTS XML structure error:"+e.getMessage();
			}
			//e.printStackTrace();
			return false;
		}
		return true;
	}