protected void generateCSVFile(File dir, String typeFilter) 
	throws IOException {
		try {
			File skillListFile = new File(dir, "skillsList_" + typeFilter + ".csv");
			HashSet<String> writtenKeys = new HashSet(skillSets.size());
			if (skillListFile.exists()) {
				skillListFile.delete();
			}
			
			System.out.println("There are " + skillSets.size() + " entries.");
			if (!skillSets.isEmpty()) {
				PrintWriter pwSkillSet = new PrintWriter(skillListFile);
				pwSkillSet.println("Skill,Type");
				for (Skillset skillSet : skillSets) {
					if (typeFilter.equalsIgnoreCase(skillSet.getSkillsetType()))
					{
						if ((skillSet.getSkillsetKey() != null) && (!skillSet.getSkillsetKey().isEmpty()))
						{
							if (!writtenKeys.contains(skillSet.getSkillsetKey())) {
								pwSkillSet.println(skillSet.getSkillsetKey() + "," + skillSet.getSkillsetType());
								writtenKeys.add(skillSet.getSkillsetKey());
							}
						}
						else {
							if (!writtenKeys.contains(skillSet.getName())) {
								pwSkillSet.println(skillSet.getName() + "," + skillSet.getSkillsetType());
								writtenKeys.add(skillSet.getName());
							}
						}
					}
					
				}
				pwSkillSet.flush();
				pwSkillSet.close();
			}
		} catch (IOException e1) {}
	}