private void loadProperties(String filename) throws Exception
	{
		//System.out.println("loading properties: " + filename);
    	File f = new File(filename);
		if(f.exists() && f.isFile())
		{
	    	InputStream inputStream = DataCreator.class.getResourceAsStream("/" + PROPERTIES_FILE);
			
			Properties props = new Properties();
			props.load(inputStream);
			
			numberOfOutputLines = Long.parseLong(props.getProperty(PROPERTY_NUMBER_OF_OUTPUT_LINES));
			categoryFilesFolder = props.getProperty(PROPERTY_CATEGORY_FILES_FOLDER);
			rowlayoutFile = props.getProperty(PROPERTY_ROW_LAYOUT_FILE);
			outputfile = props.getProperty(PROPERTY_OUTPUTFILE);
			if(props.getProperty(PROPERTY_MAXIMUMYEAR)!=null)
			{
				maximumYear = Integer.parseInt(props.getProperty(PROPERTY_MAXIMUMYEAR));
			}
			if(props.getProperty(PROPERTY_MINIMUMYEAR)!=null)
			{
				minimumYear = Integer.parseInt(props.getProperty(PROPERTY_MINIMUMYEAR));
			}
			if(props.getProperty(PROPERTY_DATAFORMAT)!=null)
			{
				dataFormat = Integer.parseInt(props.getProperty(PROPERTY_DATAFORMAT));
			}
			if(props.getProperty(PROPERTY_VERBOSE)!=null)
			{
				verbose = Boolean.parseBoolean(props.getProperty(PROPERTY_VERBOSE));
			}
		    if(props.getProperty(PROPERTY_POSSIBLE_CHARACTERS)!=null)
		    {
		    	Field.setPossibleCharacters(props.getProperty(PROPERTY_POSSIBLE_CHARACTERS));
		    }
			if(categoryFilesFolder==null)
			{
				throw new Exception("[categoryfilesfolder] unspecified in " + PROPERTIES_FILE);
			}
			if(rowlayoutFile==null)
			{
				throw new Exception("[rowlayoutfile] unspecified in " + PROPERTIES_FILE);
			}
		}
		
	}