Return the file descriptor of an output channel.
If the initialization of the output channel failed,
for example when stdout does not exist (Windows) or is not a valid fd (Unix-like),
This method will fail with error.
So .fd() can be used as a way to tell if stdout/stderr is valid.