Ensure output_string is not nil, which may happen for non-TTY output.

String[start,length] may return nil if the initial index falls outside the strength or the length is negative. Therefore the output_string may be nil for non-TTY cases, where for example stop() is called for unknown length files in middle of transaction, etc.