for some reason, the environ variable FREESURFER_HOME is not available after you delete it inside the function, but it is available in the module. So we call it from the module and we pass it to the function.