Error handling class and methods added.