Use symlink based locking to prevent race conditions