Added the ability to identify and handle gzipped files