Update error output, add the tests.