if(c == null) Debug.msg("Error encountered processing the csv file, continuing"); else if(addEntry(c)){
if(c == null){ if(!line.equals("")) Debug.err("Broken entry: "+line);  }else if(addEntry(c)){
	  public boolean importFromCSVFile(BufferedReader br){	    	    String line = "";	    boolean isJFritzExport = false; //flags to check which type to parse	    boolean isPushFile = false;  	    boolean isNewFirmware = false;	    boolean isEnglishFirmware = false;	    int newEntries = 0;			    try {	          line = br.readLine();   	          	          //check if we have a correct header	          if(line.equals(EXPORT_CSV_FORMAT_JFRITZ) || line.equals(EXPORT_CSV_FORMAT_FRITZBOX)	        		  || line.equals(EXPORT_CSV_FORMAT_FRITZBOX_PUSHSERVICE)	        		  || line.equals(EXPORT_CSV_FORMAT_FRITZBOX_NEWFIRMWARE)	        		  || line.equals(EXPORT_CSV_FORMAT_FRITZBOX_ENGLISH)){	        	  	        	  //check which kind of a file it is	        	  if(line.equals(EXPORT_CSV_FORMAT_JFRITZ))	        		  isJFritzExport = true;	        	  else if(line.equals(EXPORT_CSV_FORMAT_FRITZBOX_PUSHSERVICE))	        	  		isPushFile = true;	        	  else if(line.equals(EXPORT_CSV_FORMAT_FRITZBOX_NEWFIRMWARE))	        		  	isNewFirmware = true;	        	  else if(line.equals(EXPORT_CSV_FORMAT_FRITZBOX_ENGLISH))	        		  	isEnglishFirmware = true;	        	  	        	  int linesRead = 0;	        	  Call c;	        	  while(null != (line = br.readLine())){	        		  linesRead++;	        		  	        		  //call the apropriate parse function	        		  if(isJFritzExport)	        			  c = parseCallJFritzCSV(line);	        		  else if(isNewFirmware)	        			  c = parseCallFritzboxNewCSV(line);	        		  else if(isEnglishFirmware)	        			  c = parseCallFritzboxEnglishCSV(line);	        		  else	        			  c = parseCallFritzboxCSV(line, isPushFile);					  if(c == null)	        			  Debug.msg("Error encountered processing the csv file, continuing");	        		  else if(addEntry(c)){	        			  newEntries++;	                	        		  }	        	  }	            	        	  Debug.msg(linesRead+" Lines read from csv file ");	        	  Debug.msg(newEntries+" New entries processed");	                                         		  fireUpdateCallVector();        		  	if (newEntries > 0) {	        			        		  //uncomment these in case the import function is broken	        		  //for(int i=0; i < unfilteredCallerData.size(); i++)	        		  //	  System.out.println(unfilteredCallerData.elementAt(i).toString());	        		 	        		  saveToXMLFile(JFritz.CALLS_FILE, true);	        		  	        		  String msg;	              	        		  if (newEntries == 1) {	        			  msg = JFritz.getMessage("imported_call"); //$NON-NLS-1$	        		  } else {	        			  msg = JFritz.getMessage("imported_calls").replaceAll("%N",Integer.toString(newEntries)); //$NON-NLS-1$, //$NON-NLS-2$ 	        		  }		        		  JFritz.infoMsg(msg);	          	        	  }else{	        		  //JFritz.infoMsg(JFritz.getMessage("no_imported_calls")); //$NON-NLS-1$	        	  }	                           	          }else{	        	  //Invalid file header	        	  Debug.err("Wrong file type or corrupted file"); //$NON-NLS-1$	          }	          	          //NOTE: the caller must close the stream!	          } catch (FileNotFoundException e) {	              Debug.err("Could not read from File!");	          } catch(IOException e){	            Debug.err("IO Exception reading csv file"); //$NON-NLS-1$	          }	          	          if(newEntries > 0)	        	  return true;	          else	        	  return false;	          	  }