refactoring initial workflow and xz decompression