Add error handling for accounting