added an example of error handling and recovery