Added checks for existing entries