public static Properties readFile(Log log, File file) {
		InputStream stream = null;
		Properties properties = new Properties();
		log.info("Reading from config file");
		try {
			if (file == null) {
				log.warn("No config file given");
			} else {
				stream = new FileInputStream(file);
				properties.load(stream);
			}
		} catch (FileNotFoundException e) {
			log.error("Config file not found", e);
		} catch (SecurityException e) {
			log.error("No read access for config file", e);
		} catch (IllegalArgumentException e) {
			log.error("Improper config format", e);
		} catch (IOException e) {
			log.error("IO failure while reading config file", e);
		} finally {
			if (stream != null) {
				try {
					stream.close();
				} catch (IOException e) {
					log.warn("Failed to close stream to config file");
				}
			}
		}
		return properties;
	}