Update script to check for existing posts with the same ID