Added tests of errors as well