TextFileDecoder: complete rework