Fixed error handling and rollback in WriteDBAO