I forgot the directory path may change due to the strftime formatting with the current time. So try to simplify the logic by making the paths members of the DataStats object, and testing when the paths change and need to be re-created.
Originally posted by @garyjg in #27 (comment)