add kerncheck, move iferror