Not sure why this occuring or if the script can be modifed to give some flexibility in the saving operation.
I'm not sure what you are thinking about when you suggest giving some flexibility in the saving operation? Like what?
The script does the same thing, over and over and over, for days on end. Then suddenly the camera firmware can't save images anymore. And what the log shows is that, after the script tries to take a shot on the "even" minute boundary, the log entry (made after the shot completes) suddenly starts happening 5 seconds after the shot is made rather than 3. And the saving of the shot fails - which is probably what is causing the log entry to be a couple of seconds late. And once it fails, it stays failed until the script cycles the camera to playback at the end of the day.
But it's not the script failing. Something else is wrong with the camera - the Canon firmware seems to have grown tired of saving shots. From the log file you PM'd to me, it seems you are setting the camera to reset every 7 days. I suppose that one possible solutions is to reset more frequently. Unfortunately, there is not a lot more the script can do - the save failure is outside of its control from what I can tell.
Edit : one bizarre option would be to have the script watch the image counter, and if it stops advancing then cycle the camera through playback mode and back to shooting mode. Or even do a full restart. Kind of a disgustingly bad hack but it might keep you running with only one slightly out of sequence shot if the cam takes a picture automatically after the restart attempt. Testing to make sure it actually worked would be a bit tricky.