check errors