anchor.diff:       select case(trim(arg))
        case('-h','--help')
           ! print help and exit
  -        write(0,*) 'help'
  +        write(0,100)
           stop
        case('-u')
           ! unformatted file
           if (flag == 0) then
              flag = 1
           else
  -           write(0,*) "either -u <unformatted_file > or -f <formatted_file> option"
  +           write(0,*) "ERROR: either -u <chk_file > or -f <formatted_file> option"
              stop
           end if
           iarg = iarg + 1
           call read_opt_arg(iarg,nargs,source,err)
  -        if (err == 2) then
  -           write(0,*) 'ERROR ! missing argument: '//trim(arg)//' <filename>'
  +        if (err > 0) then
  +           write(0,*) 'ERROR ! option "-u": missing argument'
              stop
           end if
        case('-f')
  
positive.code:         if (flag == 0) then
             flag = 2
          else
             write(0,*) "either -u <unformatted_file > or -f <formatted_file> option"
             stop
          end if
          iarg = iarg + 1
          call read_opt_arg(iarg,nargs,source,err)
          if (err == 2) then
             write(0,*) 'ERROR ! missing argument: '//trim(arg)//' <filename>'
             stop
          end if
       case('-d', '--digits')
  
negative.code:         iarg = iarg + 1
          call read_opt_arg(iarg,nargs,n_digits,err)
          if (err == 2) then
             write(0,*) 'ERROR ! option "-d": missing argument'
             stop
          end if
       case default
          write(0,*) 'ERROR ! unkown argument '//trim(arg)
          write(0,100)
          stop
       end select
    end do args_loop
  