A new way to put togethers files. It's maybe longer, but I should avoid memory errors for big files.
Minor modification