Love the script!
Issue I'm sure everyone has faced recently is this:
A day's files are put in a directory named YYYY-CWww where ww is the week's number in ISO calendar. However, the ISO calendar doesn't line up well with the normal calendar around the change of the year: (https://www.youtube.com/watch?v=D3jxx8Yyw1c)
ISO always starts the year on a Monday. So Mon 30th Dec 2019 was, in ISO, 1st day of 1st week of 2020.
Usually this is not a problem but for the two days of Monday and Tuesday 30th & 31st Dec, the script tries to save the files for those days in 2019-CW1 because it gets the week number from the ISO calendar, but the year from the normal calendar. I suggest either changing the year handling to be ISO, or put in a check so that if the month is December and the ISO week is 1, then set the ISO week to 53 (although I think some ISO years already have 53 weeks in them so it might be more complicated).
Thanks!