Added kv.error and kv.warn functions