Add error reporting and undo