anchor.diff:          iarg = iarg + 1
           call read_opt_arg(iarg,nargs,n_digits,err)
           if (err == 2) then
  -           write(0,*) 'ERROR ! missing argument: '//trim(arg)//' <n>'
  +           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
  
positive.code:      call units_open_unf(source,'unknown',unt,err)
       write(unt) nvars
       write(unt) nclasses
       write(unt) data_type     
       write(unt) ndata
       do id = 1,ndata
          write(unt) seqs(:,id)
       end do
       write(unt) prm
       close(unt)
       
    end select
  
  end program pchk
  
negative.code:      ! read nvars
       call parse_next_line(unt, line, parsed_line, nfields, err)
       if (err < 0) then
          write(0,*) "ERROR: invalid formatted input file"
          stop
       end if
       read(parsed_line, *, iostat=err) nvars
       if (err < 0) then
          write(0,*) "check n. of features"
          stop
       end if
  
       ! read nclasses
       call parse_next_line(unt, line, parsed_line, nfields, err)
       if (err < 0) then
          write(0,*) "input file can be converted to a valid checkpoint file"
          stop
       end if
       read(parsed_line, *, iostat=err) nclasses
       if (err < 0) then
          write(0,*) "check n. of classes"
          stop
       end if
  
       ! read data type
       call parse_next_line(unt, line, parsed_line, nfields, err)
       if (err < 0) then
          write(0,*) "input file can be converted to a valid checkpoint file"
          stop
       end if
       read(parsed_line, *, iostat=err) data_type
       if (err < 0) then
          write(0,*) "check output data type format"
          stop
       end if
  
       ! read ndata
       call parse_next_line(unt, line, parsed_line, nfields, err)
       if (err < 0) then
          write(0,*) "input file can be converted to a valid checkpoint file"
          stop
       end if
       read(parsed_line, *, iostat=err) ndata
       if (err < 0) then
          write(0,*) "check n. of samples in .chk file"
          stop
       end if
  
       ! if the first lines are ok, allocate
       allocate(prm(nvars*nclasses + nvars*(nvars - 1)*nclasses**2/2),stat=err)
       prm = 0.0_kflt
  