Add context to makeBatchHandler