#258 Add error handling and reporting