SQLPlus spool file

HI

Have some problem with spooling out some relatively large number of records (~2-3 mil)
Small table - OK though.

Getting error: SP2 0308: cannot close spool file.

Any thoughts?

sqlplus -s user/pwd << EOF 
  set term off
  set head off
  set trims on
  set pages 0
  set feedback off
  set linesize 1000
 
 
      spool test.dat
            select * from small_table; -- OK
            --select * from large_table;  --ERROR
      spool off
  exit 0;
EOF

Have you just an idea of the size of the file?...
What is the point?
You will have quite some trouble looking at it with vi...
Where is this file written? do you have to be safe >3GB free there?