let output_ch () =
    if Opt.is_set out_ch then 
      open_out (Opt.get out_ch)
    else stdout