added support for .gz files