added optional length checking for csv import.