new class for writing output asynchronously