now automatically detects when the last slide is reached and stop auto-export then (optionnal)