boolean lock() {
		try {
			out = new FileOutputStream(lockFile, true);
			fc = out.getChannel();
			lock = fc.tryLock();
			isLocked = (lock != null);

			if (!isLocked) {
				release();
			}

			return isLocked;
		}
		catch (IOException | OverlappingFileLockException e) {
			release();
		}
		return false;
	}
A flag to signal that we are locked.  This is needed because we do not want to 'cleanup'
lock files when we can't lock, as they may already be in use by another application 
instance.
Ghidra/Framework/Generic/src/main/java/generic/util/FileChannelLock.java