still tiny bug.  file is writing correctly, decoding is not going well