fix NameError when opening uncompressed file