Added error handling example