Bug fix

Bug fix in the end of csv file with a blank line.