In the new framework with filehandle passing, the provided callback must accept a data argument. get_diags can't actually use it, but does have to accept a token value.