anchor.diff:  ! (b):
   call DSYEV( 'V', 'U', 3, m, 3, b, WORK, size(WORK), ok )
   if (ok .eq. 0) then
  -    write(*,*) "Principle effective masses and directions:"
  +    write(ilog,*) "Principle effective masses and directions:"
       do i=1, 3
  -        write(*,"(A25,F10.2)") "Effective mass:", 1.0D0/b(i)
  -        write(*,"(A25,3F10.6)") "Cartesian coordinate:", (m(j,i), j=1,3)
  +        write(ilog,"(A25,F10.2)") "Effective mass:", 1.0D0/b(i)
  +        write(ilog,"(A25,3F10.6)") "Cartesian coordinate:", (m(j,i), j=1,3)
           v = real_cart2fract(f, m(i,:))
           call normal(v,3)
  -        write(*,"(A25,3F10.3)") "Direct lattice vectors:", (v(j), j=1,3)
  +        write(ilog,"(A25,3F10.3)") "Direct lattice vectors:", (v(j), j=1,3)
  +        write(ilog,*)
       end do
   else
  -    write (*,*) "INFO from DGEEV: ", ok
  +    write (ilog,*) "INFO from DGEEV: ", ok
   endif
   
   end program
  
positive.code:     read(iunt,fmt=*) prg
      read(iunt,*) ((f(j,i),j=1,3),i=1,3)
  close(iunt)
  
  if(prg .eq. 'V') then
      !write(*,*) "dk will be converted to VASP units (2Pi/A)"
      !dk = dk/(2.0D0*pi*b2a)
  end if
  write(*,"(A,I5,F12.5)") "band, dk: ", band, dk
  
  ! read EIGENVAL ###########################################
  
  
negative.code: integer(kind=4) :: itrash, count, nbands, band, A(4)
  character(len=1) :: prg
  external :: DSYEV
  
  open(unit=ilog,file='emc_calc.log',form='formatted')
  write(ilog,*) "Effective Mass Calculator calculator ", version_number
  write(ilog,*)
  
  ! read input ########################################################
  
  