initFileCache cachePath testFile = do
  let (tpath, ih, seed)  = metadata testFile
  fHandle <- openFile (fileDataPath testFile) ReadMode
  cache <- Cache.load cachePath  
  Cache.put cache (fromJust $ textToInfoHash ih)
                  $  sourceHandle fHandle
  hClose fHandle
  Cache.close cache
initFileCache cachePath testFile = do
  let (tpath, ih, seed)  = metadata testFile
  fHandle <- openFile (fileDataPath testFile) ReadMode
  cache <- Cache.load cachePath  
  Cache.put cache (fromJust $ textToInfoHash ih)
                  $  sourceHandle fHandle
  hClose fHandle
  Cache.close cache
initFileCache cachePath testFile = do
  let (tpath, ih, seed)  = metadata testFile
  fHandle <- openFile (fileDataPath testFile) ReadMode
  cache <- Cache.load cachePath  
  Cache.put cache (fromJust $ textToInfoHash ih)
                  $  sourceHandle fHandle
  hClose fHandle
  Cache.close cache