collect assert errors + add function for checking the collected errors