Added CUDA_FAIL flag