finish has unicode and encode problem when write into txt file