added automatic support for compressed files (gz, xz, bz2)