API: updated error messages, added more CV checking