Restored functions in TorrentUtil. Still need to test finalCleanup.