added encoding for file.