If the folder "\CRW\" is empty then the CRW and HDR file will be named - "STR_0001.*".
But the JPEG file will be have a different digits in filename (Sample: IMG_2171.JPG, STR_0001.CRW, STR_0001.HDR).
I don't think it is because the \CRW\ folder is empty.
That normally happens if they are no JPG's in your current Canon folder.
If you have at least one JPG in the folder the numbering should work fine.
The problem is caused by the Canon function that returns next image number not working properly on the first image after booting.
I do not know if CHDK has had the same problem.
I have not had time to look at every CHDK port or patch but I vaguely remember seeing in at least one build, mention of adding a delay in order to give the Canon firmware time to return the correct file number.
Can anyone remember which build that is mentioned in ?