FIX: check if std_output_hdl is None