Added error reporting class and simple test case