@SuppressWarnings({ "rawtypes" })
	private static Map getLogFileNameAndDateToParse() {
		Map<String, Object> collection = new HashMap<String, Object>();
		String fileNamePattern = System.getProperty("logFileNamePattern");
		
		int currentYear = DateUtils.getCurrentYear();
                //Add 1 as the Jan = 0 
		int currentMonth = DateUtils.getCurrentMonth() + 1;
                
		int currentDayOfMonth = DateUtils.getCurrentDayOfMonth();
		
                Date dateToParseLogFor = DateUtils.getYesterdaysDate();
                
                if (currentDayOfMonth == 1)
                {                   
                    currentMonth = currentMonth - 1;
                }
                
                if (currentDayOfMonth == 1 && currentMonth == 1)
                {                   
                    currentYear = currentYear - 1;
                }               
		
		if (fileNamePattern.contains("%m"))
		{       
                        String strCurrentMonth = "";
                        if (currentMonth < 10)
                        {
                            strCurrentMonth = "0"+currentMonth;
                        }
                        else{
                            strCurrentMonth = currentMonth+"";
                        }
			fileNamePattern = fileNamePattern.replace("%m", strCurrentMonth);
		}
		if (fileNamePattern.contains("%Y"))
		{
			String strCurrentYear = currentYear+"";
			fileNamePattern = fileNamePattern.replace("%Y", strCurrentYear);
		}
		else if (fileNamePattern.contains("%y"))
		{
			String strCurrentYear = currentYear+"";
			fileNamePattern = fileNamePattern.replace("%y", strCurrentYear.subSequence(2, 4));
		}
		
		collection.put("fileName", fileNamePattern);
		collection.put("dateToParse", dateToParseLogFor);
		
		return collection;
		
	}