Added maxCycles after which automatic export occurs