diff: support custom callbacks for output