Added auto persist option to generation script