Finally works! decodes file
doesn't decode last character