tests for errors