scan saving: make sure sample or dataset is not reset because proposal or sample were not defined before