made the output_buffer a thread resource