added thread safety to ``out_mgr``