Refactor the code. Show raw output after uploading the file. Formatting + encoding needed.