I'm trying to write a procedure that creates and updates Inventory, however every time i try to run the program, i get a runtime error and the program closes itself, and it doens't seem to create any text file, i'm not sure what the problem might be or how to solve it, so help would be very much apreciated.

Here is the procedure 

```
procedure inventary(arch:string);
var f:text;
    op:char;
    key,name,desc:string;
begin
     assign (f,arch);

     if eof(f) then
        rewrite(f)
         else
      append(f);
                 writeln('Article key');
                 readln(key);
                 writeln('Article name');
                 readln(name);
                 writeln('article description');
                 readln(desc);
                 write(f,key,',',name,',',desc,',');
                 op:='s';
           while (op <> 'n') or (op <> 'N') do
            begin
                 writeln('add another product? y/n');
                 readln(op);
                 if (op = 'y') or (op = 'Y') then
                 begin
                  writeln('Article key');
                 readln(key);
                 writeln('Article name');
                 readln(name);
                 writeln('article description');
                 readln(desc);
                 write(f,key,',',name,',',desc,',');
                 end
                 else
                 writeln('bye');
                 readln();

            end;

close(f);
readln();
end;

```

Program i'm using to test it:

```
  uses proyectounit;
    var
    arch:string;
    c:char;
    begin
    writeln('Name of the inventary');
    readln(arch);
    Writeln('Do you wish to add a product');
    readln(c);
    if c='s' then
    inventary(arch+'.txt');
    Writeln('Do you wish to change something?');
    readln(c);
    if c='s' then
    cambios(arch+'.txt','001');
    writeln('end');
    readln;
    end.

```