Put `k` and `n` in the error msg.