renamed Error to KError to avoid conflict with system Error