changed file upload to use fgetcsv and not file and updated it to handle files with multiple line endings