checking for the existence of chain files before running the statistics