about the first issue, the 'Tolerance' allows to adjust the valid ADUs range. Have you tried to increase it?
Sky flat ADU values change rapidly so having an higher tolerance should help preventing the issue.

The log that you attached seems to show a correct behavior, it captured 3 out of 40 images and it's not in a infinite loop.
To me the double image in the log seems to be caused by a double logging of the same image but to be sure it should be looked into the source code.
Do you get 80 images instead of 40?

The log shows an interval of about 12s between a capture and the next, while the exposure is only 1s.
Did you set a 'delay' of 10s? if this is the case, I would decrease it, it will help to have ADUs in the correct range.

Ferrante

Read More...