inline callbacks for stream writer