Added duplicate checking to data importing.