Added additional checks for working CUDA and locking infrastructure.