test for errors