I don't think you should have to open OUTPUT_UNIT at all. From the Fortran 2008 standard:

> The value of the default integer scalar constant OUTPUT UNIT identifies the same processor-dependent external
> unit **preconnected** for sequential formatted output as the one identified by an asterisk in a WRITE statement