public static void processQuestion2(String directoryName, String[] logFileNames) {
        for (String fileName : logFileNames) {
            final Map<String, RequestLog> requestCacheMap = new HashMap<String, RequestLog>();
            final List<ResponseLog> responseList = new ArrayList<ResponseLog>();
            final List<ExceptionPeriod> exceptionPeriodList = new ArrayList<ExceptionPeriod>();
            int lastPeriodIndex = 0;
            ExceptionPeriod maxAvgDelayPeriod = new ExceptionPeriod(0l, 0l);
            IOUtil.processLine(new LineProcessor() {
                @Override
                public void process(String line) {
                    RequestLog request = LogParser.parseRequestLog(line);
                    if (request != null) {
                        requestCacheMap.put(request.getRequestID(), request);
                    } else {
                        ResponseLog response = LogParser.parseResponseLog(line);
                        if (response == null) {
                            return;
                        }
                        responseList.add(response);
                        response.setRequestTime(requestCacheMap.get(response.getRequestID()).getRequestTime());
                        delayTotalTime += response.getDelayTime();
                        responseCount++;
                        requestCacheMap.remove(response.getRequestID());
                    }
                }
            }, directoryName, fileName);
            delayAvgTime = delayTotalTime / responseCount;
            for (ResponseLog response : responseList) {
                if (response.getDelayTime() > delayAvgTime) {
                    ExceptionPeriod lastPeriod = null;
                    if (exceptionPeriodList.isEmpty()) {
                        lastPeriod = new ExceptionPeriod(response.getRequestTime(), response.getResponseTime());
                        exceptionPeriodList.add(lastPeriod);
                    } else {
                        lastPeriod = exceptionPeriodList.get(lastPeriodIndex);
                    }
                    if ((response.getResponseTime() - lastPeriod.getEndTime()) > 2 * MINUTE) {
                        lastPeriod = new ExceptionPeriod(response.getRequestTime(), response.getResponseTime());
                        exceptionPeriodList.add(lastPeriod);
                        lastPeriodIndex++;
                    }
                    lastPeriod.addNewResponse(response);
                }
            }

            for (ExceptionPeriod period : exceptionPeriodList) {
                if (period.getPeriodTime() > maxAvgDelayPeriod.getPeriodTime()) {
                    maxAvgDelayPeriod = period;
                }
            }

            StringBuilder sb = new StringBuilder(LogParser.parseDateFromFilename(fileName));
            sb.append(",").append(OUTPUT_FORMAT.format(new Date(maxAvgDelayPeriod.getStartTime()))).append(",")
                    .append(OUTPUT_FORMAT.format(new Date(maxAvgDelayPeriod.getEndTime())));
            sb.append("\n");
            IOUtil.writeStringToFile("C:\\CodeMarathon\\Result\\Q2.csv", sb.toString());
        }

    }