Updated to use detected archive extension