anchor.diff:  
           type(logging_t), intent(in) :: logging_info
   
  -        write (logging_info%death_unit, '(1X,"HANDE QMC Death Log File")')
  -        write (logging_info%death_unit, '()')
  -
  -        call environment_report(logging_info%death_unit)
  +        integer :: iunit
  +
  +        iunit = logging_info%death_unit
  +
  +        write (iunit, '(1X,"HANDE QMC Death Log File")')
  +        write (iunit, '()')
  +
  +        call environment_report(iunit)
   
           select case (calc_type)
           case(fciqmc_calc)
  -            write (logging_info%death_unit, '(1X,"Calculation type: FCIQMC")')
  +            write (iunit, '(1X,"Calculation type: FCIQMC")')
           case(ccmc_calc)
  -            write (logging_info%death_unit, '(1X,"Calculation type: CCMC")')
  +            write (iunit, '(1X,"Calculation type: CCMC")')
           end select
   
  -        write (logging_info%death_unit, '(1X,"Verbosity Settings:")')
  -        write (logging_info%death_unit, '(1X,10X,"Write Successful Deaths:",2X,L1)') &
  +        write (iunit, '(1X,"Verbosity Settings:")')
  +        write (iunit, '(1X,10X,"Write Successful Deaths:",2X,L1)') &
                           logging_info%write_successful_death
  -        write (logging_info%death_unit, '(1X,10X,"Write Failed Deaths:",2X,L1)') &
  +        write (iunit, '(1X,10X,"Write Failed Deaths:",2X,L1)') &
                           logging_info%write_failed_death
   
  -        write (logging_info%spawn_unit,'()')
  +        write (iunit,'()')
   
       end subroutine write_logging_death_preamble
   
  
positive.code:         real(p), intent(in) :: pgen, qn_weighting, parent_sign
          integer(int_p), intent(in) :: nspawned(:)
          logical, intent(in) ::  cmplx_wfn
  
          if (logging_info%write_logging) then
              if ((logging_info%write_successful_spawn .and. any(abs(nspawned) > 0)) .or. &
                   (logging_info%write_failed_spawn .and. all(nspawned == 0))) then
  
                  write (logging_info%spawn_unit,'(1X)', advance='no')
  
                  if (cmplx_wfn) then
                      call write_qmc_var(logging_info%spawn_unit, real(hmatel%c), sep=',')
                      call write_qmc_var(logging_info%spawn_unit, aimag(hmatel%c), sep=',')
                  else
                      call write_qmc_var(logging_info%spawn_unit, hmatel%r, sep=',')
                  end if
  
                  call write_qmc_var(logging_info%spawn_unit, pgen, sep=',')
                  call write_qmc_var(logging_info%spawn_unit, qn_weighting, sep=',')
                  call write_qmc_var(logging_info%spawn_unit, parent_sign, sep=',')
                  call write_qmc_var(logging_info%spawn_unit, nspawned(1), sep=',')
  
                  if (cmplx_wfn) call write_qmc_var(logging_info%spawn_unit, nspawned(2), sep=',')
  
                  write (logging_info%spawn_unit,'()')
              end if
          end if
  
  
negative.code:         integer(int_p), intent(in) :: ndeath_tot
          integer(int_64), intent(in) :: nattempts
          type(logging_t), intent(in) :: logging_info
          integer :: iunit
  
          iunit = logging_info%calc_unit
  
          if (logging_info%write_logging .and. logging_info%write_highlevel_values) then
              write (logging_info%calc_unit,'(1X)', advance='no')
              call write_qmc_var(iunit, iter, sep=',')
              call write_qmc_var(iunit, nspawn_events, sep=',')
              call write_qmc_var(iunit, ndeath_tot, sep=',')
              call write_qmc_var(iunit, nattempts, sep=',')
              write (iunit,'()')
          end if
  
      end subroutine write_logging_calc_fciqmc
  