Added extra checks when importing data