add more support for compressed input files