Altered the function generate tarball to be smarter about log usage and free space