private void getAddedFile(Map<String, String> nowDirFileMap) {
		for (Iterator<String> iterator = nowDirFileMap.keySet().iterator(); iterator
				.hasNext();) {
			String key = iterator.next();
			if (null == oldDirFileMap.get(key)) {
				oldDirFileMap.put(key, nowDirFileMap.get(key));
				TjuFit a = new TjuFit();
				int len = key.length();
				String filename = key.substring(key.lastIndexOf("/") + 1, len);
				Log a1 = new Log(filename);
				a1.setFilename(filename);
				String sub = key.substring(len - 4, len);
				try {
					if (sub.equals("fits"))// test whether it is a fits
					{
						FitsFile file = a.GetFitsFile(key);
						if (null == file) {
							file = a.GetFitsFile(key);
						}
						a1.setRa(a.GetRA(file));
						a1.setDec(a.GetDec(file));
						a1.setObject(a.GetObject(file));
						a1.setInstrument(a.Getinstru(file));
						int m = LogTool.newContentPane.jcomchoose;
						String observer = LogTool.newContentPane.jcompid[m];
						String proposalid = LogTool.newContentPane.jcomid[m];
						a1.setObserver(observer);
						a1.setProposalid(proposalid);
						a1.setStartUTC(a.GetStartUTC(file));
						a1.setExposuretime(a.GetExposureTime(file));
						a1.setFilter(a.GetFilter(file));
						a1.setYfua(a.GetYFUA(file));
						a1.setYfub(a.GetYFUB(file));
						a1.setSlit(a.GetSlit(file));
						a1.setGrism(a.GetGrism(file));
						a1.setTelescope(a.GettelFocus(file));
						a1.setInstfoc(a.GetinstFocus(file));
						a1.setObstype("unk");
						a1.setLength(file.length());
						// fwhm repeat funciton
						if (LogTool.newContentPane.statusindex == 0) {
							if (indexnum > 0) {
								if (LogTool.newContentPane.model
										.getValueAt(indexnum - 1, 17)
										.toString().equals("")) {
								} else {
									LogTool.newContentPane.Tfwhm = Float
											.parseFloat(LogTool.newContentPane.model
													.getValueAt(indexnum - 1,
															17).toString());
									a1.setFwhm(LogTool.newContentPane.Tfwhm);
								}
							}
						}
						LogTool.newContentPane.statusindex = 0;
						LogTool.newContentPane.model.addlog(indexnum, a1);
						LogTool.newContentPane.repaint();
						LogTool.newContentPane.model.setValueAt(
								LogTool.newContentPane.Tfwhm, indexnum, 17);
						LogController.insert(a1);
						dir = name;

						LogTool.newContentPane.statusText
								.setText("There are totally " + indexnum
										+ " Records");
						LogTool.newContentPane.count = indexnum;
					}
				} catch (NullPointerException e2) {
					LogTool.newContentPane.thread.stop();
					System.out.println("start a new thread to monitor");
					LogTool.newContentPane.thread = new FileMonitor();
					LogTool.newContentPane.thread.start();
				} catch (IllegalArgumentException e){
					LogTool.newContentPane.thread.stop();
					System.out.println("start a new thread to monitor");
					LogTool.newContentPane.thread = new FileMonitor();
					LogTool.newContentPane.thread.start();
				}
			}
		}
	}