Add error handling for GIF rendering