Why can't I SPOOL an EXPLAIN PLAN? Why can't I spool the explain plan to a txt file?

SPOOL EXPLAIN_PLAN_1.txt

set heading off
set echo off
set pages 999
set long 90000

select plan_table_output from
table(dbms_xplan.display('plan_table',null,'typical'));

SPOOL OFF;


Error that I see

SP2-0768: Illegal SPOOL command
Usage: SPOOL { &lt;file&gt; | OFF | OUT }
where &lt;file&gt; is file_name[.ext] [CRE[ATE]|REP[LACE]|APP[END]]


Oracle Version: 11g
SP2-0768 Illegal SPOOL command
  
  Cause: An invalid option was used in the SPOOL command.
  Action: Check the syntax of the SPOOL command for the correct options.
  
  SP2-0769 Usage: SPOOL { &lt;file&gt; | OFF | OUT }
  
  where &lt;file&gt; is file_name[.ext] [CRE[ATE]|REP[LACE]|APP[END]]
  Cause: Incorrect syntax for the SPOOL command was entered.
  Action: Check the syntax of the SPOOL command for the correct usage.


Exact same command that you have shown in the question is working fine for me as shown below.
OS: Oracle Linux 6
Oracle Version: 11.2.0.4.0

[oracle@testsrv Desktop]$ sqlplus / as sysdba

SQL&gt; SPOOL EXPLAIN_PLAN_1.txt
SQL&gt; set heading off
SQL&gt; set echo off
SQL&gt; set pages 999
SQL&gt; set long 90000
SQL&gt; explain plan for select * from hr.employees;

Explained.

SQL&gt; select plan_table_output from
table(dbms_xplan.display('plan_table',null,'typical'));  2  

Plan hash value: 1445457117

-------------------------------------------------------------------------------
| Id  | Operation     | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
-------------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |       |   107 |  7383 |     3   (0)| 00:00:01 |
|   1 |  TABLE ACCESS FULL| EMPLOYEES |   107 |  7383 |     3   (0)| 00:00:01 |
-------------------------------------------------------------------------------

8 rows selected.

SQL&gt; SPOOL OFF;

[oracle@testsrv Desktop]$ cat EXPLAIN_PLAN_1.txt
SQL&gt; 
SQL&gt; explain plan for select * from hr.employees;

Explained.

SQL&gt; select plan_table_output from
  2  table(dbms_xplan.display('plan_table',null,'typical'));

Plan hash value: 1445457117                                                     

------------------------------------------------------------------------------- 
| Id  | Operation         | Name      | Rows  | Bytes | Cost (%CPU)| Time     | 
------------------------------------------------------------------------------- 
|   0 | SELECT STATEMENT  |           |   107 |  7383 |     3   (0)| 00:00:01 | 
|   1 |  TABLE ACCESS FULL| EMPLOYEES |   107 |  7383 |     3   (0)| 00:00:01 | 
------------------------------------------------------------------------------- 

8 rows selected.

SQL&gt; SPOOL OFF;
[oracle@testsrv Desktop]$