Added code to get overall statistics of all files in specified directory, and write them to the same statistics file