Improved the function to open files in a archive.