added support for gzipped files