Loop will now modify itself and rerun. Custom pickle function added to persist function