Refactored problem_setup to use retry_on_exception