public boolean parseFile(){
		try{
			doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(inputFilename));
			Node rootNode = doc.getDocumentElement();
			if(rootNode.getNodeName().equalsIgnoreCase("system")){
				parseNode(rootNode, null);
			}else{
				System.err.println("The root component is not <system>");
				return false;
			}		
		}  catch (FactoryConfigurationError e) {
			System.err.println("DocumentBuilderFactory Configuration error:"+e.getMessage());
			//e.printStackTrace();
			return false;
		} catch (ParserConfigurationException e) {
			//e.printStackTrace();
			System.err.println("Parser Configuration error:"+e.getMessage());
			return false;
		} catch (SAXException e) {
			System.err.println("XML error:"+e.getMessage());
			//e.printStackTrace();
			return false;
		} catch (IOException e) {
			if( e instanceof FileNotFoundException) {
				System.err.println("Input file "+inputFilename+" is not founded");
			}
			else
			{
				System.err.println("I/O error:"+e.getMessage());
			}
			//e.printStackTrace();
			return false;
		} catch (Exception e) {
			if(e instanceof NumberFormatException) {
				System.err.println("CARTS XML tag value is not number:"+e.getMessage());
			}
			else
			{
				System.err.println("CARTS XML structure error:"+e.getMessage());
			}
			e.printStackTrace();
			return false;
		}
		
		return true;
	}