move error check to otl_check