       for files in all_files
         if myregex.test(files) == true
           matches.push(files)
-      console.log(matches.sort(sortNumber))
+      #console.log(matches.sort(sortNumber))
       while i < matches.length
         if matches[i] != null
           # file_array = matches[i].split "\\"

      #console.log(temp_date_array)
      while j < temp_date_array.length
        if temp_date_array[j] != null
          date = temp_date_array[j][0]
          date_array.push(date)
          #console.log(date)
          split_date = date.split "-"
          month = split_date[1]
          if !dict[month]
            dict[month] = 1
          else
            dict[month]+=1
        j++
      final_array.push("date,close" + "\n")
      for line in date_array
        check = line.split('-')
        console.log(line)
        final_array.push(line + ',' + dict[check[1]] + "\n")
      fs.writeSync(fd, final_array.join(""))
      fs.closeSync(fd)
      console.log(dict)


module.exports =
    graphicData = (FileSys) ->
      date_sort_asc = (date1, date2) ->
        if date1 > date2
          return 1
        if date1 < date2
          return -1
      getMonth = (monthStr) ->
        new Date(monthStr + '-1-01').getMonth() + 1
      date_regex = /[0-9]{4}-[0-9]+-[0-9]+/g
      matches = []
      temp_date_array = []
      date_array = []
      final_array = []
      dict = {}
      date_obj_array = []
      month_array = []
      i = 0
      j = 0
      all_files = FileSys.files
