Rename method isWriteLocked to isWriteLockedByAnother and added a check if another process has the lock