Add failure handling