public ArrayList<FailureEvent> generateFailure() {
    	if(events == null) {
	        events = new ArrayList<FailureEvent>();
	
	        // create a temp array
	        fieldArray = new String[MAX_FIELD];
	        
	        try {
		        if (fileName.endsWith(".gz")) {
		        	readGZIPFile(fileName);
		        }
		        else if (fileName.endsWith(".zip")) {
		            readZipFile(fileName);
		        }
		        else {
		            readFile(fileName);
		        }
			} catch (FileNotFoundException e) {
				logger.log(Level.SEVERE, "File not found", e);
			} catch (IOException e) {
				logger.log(Level.SEVERE, "Error reading file", e);
			}
    	}
        
        return events;
    }