text file service - bug related with locale fixed

+refactoring