Fixed codec issues when reading files StreamController