public static List<String[]> readCSVFile(final String fileName, final String separator,
			final int expectedColumns) {
		final List<String[]> data = new ArrayList<String[]>();
		FileReader fileReader = null;
		BufferedReader in = null;
		try {
			final File file = new File(fileName);
			if (!file.exists()) {
				throw new IllegalArgumentException("File '" + fileName + "' does not exist");
			}
			fileReader = new FileReader(file);
			in = new BufferedReader(fileReader);
			String inputLine;
			int lineNumber = 0;
			inputLine = in.readLine();
			while (inputLine != null) {
				lineNumber++;
				final String[] row = inputLine.split(separator);
				if (expectedColumns == -1 || expectedColumns == row.length) {
					data.add(row);
				} else {
					throw new AssertionError("Unexpected row length (line " + lineNumber + " ). "
							+ "Expected:" + expectedColumns + " real " + row.length
							+ ". CVS-file incorrectly formatted?");
				}
				inputLine = in.readLine();
			}
			
		} catch (final IOException i1) {
			LOG.severe("Can't open file:" + fileName);
		} finally {
			if(in!=null){
				try {
					in.close();
				} catch (IOException e) {
					//ignore
				}
			}
		}
		return data;
	}