no need for lexical cast and uuid here: you can use fs::unique_path if it needs to be unique, but I'm not sure if hardcoding a name for the probe file wouldn't be better for troubleshooting.
Another (potentially better, as it will follow for wallet paths too) possibility would be to report a different failure from the LockDirectory function, as creating the lock file is done separately. E.g. change this to actually report an error:
// Create empty lock file if it doesn't exist.
FILE* file = fsbridge::fopen(pathLockFile, "a");
if (file) fclose(file);