Dot-Matrix Printer and Windows 95 and Text Printing

I am using dot-matrix printers.
I am using this code for printing in Delphi 3.  (Text print, not windows
printer driver)
        var
         F        : TextFile;
        Begin
        AssignFile(F,'LPT1:');
        Rewrite(F);
        Writeln(F,'Line1');
        .....
        CloseFile(F);
        End;

But, sometimes Windows 95 crashing with "SPOOL32 error". After this error ,
I am restart windows and continue printing.

Can anyone help me?