fix some bugs

fix encoding problem with CSV file, up the wait