Adding error handling snippets.