Add exception handling with built-in retry options