public static Properties loadProperties(String fileDir, String fileName) throws IOException {
		Properties properties = new Properties();
		if (fileDir == null)
			fileDir = System.getProperty("user.dir");
		File dir = new File(fileDir);
		if (!dir.isDirectory()) { //then use the user directory - it must be a directory
			String userDirName = System.getProperty("user.dir");
			File userDir = new File(userDirName);
			dir = new File(userDir, fileDir); //in case it was not an absolute path, but relative to the user directory
			if (!dir.isDirectory())
				dir = new File(userDirName);
		}
		// Open the properties file
		File propFile = new File(dir, fileName);
		if (!propFile.isFile()) {
			throw new IOException("The property file named " + 
					fileName + " does not exist in the directory " + 
					dir.getAbsolutePath());
		}
		try {
			properties.load( new FileReader(propFile) );
		} catch (Exception e) {
			throw new IOException("The property file named " + 
					fileName + " could not be loaded.  Exception: " + 
					e.getMessage(), e);
		}
		return(properties);
	} //end of loadProperties