Adding ability to retain a stale value when generate function fails or times out