Threshold for blink is incorrect and not saving images