Adding error handling example