Fix decoder if you give it a file handle