diff --git a/Documentation/Haddocset.hs b/Documentation/Haddocset.hs
--- a/Documentation/Haddocset.hs
+++ b/Documentation/Haddocset.hs
@@ -9,15 +9,16 @@
 module Documentation.Haddocset where
 
 import           Control.Applicative
-import           Control.Exception
+import           Control.Monad.Catch
 import           Control.Monad
+import           Control.Monad.Trans.Resource
 import           Control.Monad.IO.Class
 
 import qualified Filesystem                        as P
 import qualified Filesystem.Path.CurrentOS         as P
 
 import           System.IO
-import           System.IO.Error
+import           System.IO.Error(mkIOError, alreadyExistsErrorType, isDoesNotExistError)
 import           System.Process
 
 import qualified Database.SQLite.Simple            as Sql
@@ -175,17 +176,17 @@
               P.</> docRationalDir doc
     liftIO $ P.createTree (P.directory dst)
     ex <- liftIO $ (||) <$> P.isFile dst <*> P.isDirectory dst
-    when ex $ monadThrow $ mkIOError alreadyExistsErrorType "copyDocument" Nothing (Just $ P.encodeString dst)
+    when ex $ throwM $ mkIOError alreadyExistsErrorType "copyDocument" Nothing (Just $ P.encodeString dst)
     case P.extension $ docRationalDir doc of
         Just "html"    -> liftIO $ copyHtml doc dst
         Just "haddock" -> return ()
         _              -> liftIO $ P.copyFile full dst
 
-docFiles :: MonadIO m => PackageId -> [P.FilePath] -> Producer m DocFile
+docFiles :: (MonadIO m, MonadResource m) => PackageId -> [P.FilePath] -> Producer m DocFile
 docFiles sourcePackageId haddockHTMLs =
     forM_ haddockHTMLs $ \dir ->
-        P.traverse False dir
-            =$= awaitForever (\f -> yield $ DocFile sourcePackageId dir $ fromMaybe (error $ "Prefix missmatch: " ++ show (dir ,f)) $ P.stripPrefix dir f)
+        P.sourceDirectoryDeep False (P.encodeString dir)
+            =$= awaitForever (\f -> yield $ DocFile sourcePackageId dir $ fromMaybe (error $ "Prefix missmatch: " ++ show (dir ,f)) $ P.stripPrefix dir (P.decodeString f))
 
 data Provider
     = Haddock  PackageId P.FilePath
@@ -283,7 +284,7 @@
   where
     go = do
         putStr "    " >> putStr (display $ diPackageId iFile) >> putChar ' ' >> hFlush stdout
-        docFiles (diPackageId iFile) (diHTMLs iFile)
+        runResourceT $ docFiles (diPackageId iFile) (diHTMLs iFile)
             $$ (if quiet then id else (progress False  10 '.' =$)) (copyDocument docDir)
         Sql.execute_ conn "BEGIN;"
         ( moduleProvider iFile
diff --git a/Main.hs b/Main.hs
--- a/Main.hs
+++ b/Main.hs
@@ -107,7 +107,7 @@
                          <$> (strOption (long "CFBundleIdentifier")   <|> pure "haskell")
                          <*> (strOption (long "CFBundleName")         <|> pure "Haskell")
                          <*> (strOption (long "DocSetPlatformFamily") <|> pure "haskell"))
-                 <*> many (argument (Just . P.decodeString) (metavar "CONFS" <> help "path to installed package configuration."))
+                 <*> many (argument (P.decodeString <$> str) (metavar "CONFS" <> help "path to installed package configuration."))
 
-    addOpts    = Add <$> some (argument (Just . P.decodeString) (metavar "CONFS" <> help "path to installed package configuration."))
+    addOpts    = Add <$> some (argument (P.decodeString <$> str) (metavar "CONFS" <> help "path to installed package configuration."))
 
diff --git a/haddocset.cabal b/haddocset.cabal
--- a/haddocset.cabal
+++ b/haddocset.cabal
@@ -1,5 +1,5 @@
 name:                haddocset
-version:             0.1.0
+version:             0.2.0
 synopsis:            Generate docset of Dash by Haddock haskell documentation tool
 description:         please read README.md <https://github.com/philopon/haddocset/blob/master/README.md>
 license:             BSD3
@@ -17,21 +17,24 @@
   main-is:             Main.hs
   other-modules:       Documentation.Haddocset
   ghc-options:         -Wall -O2
-  build-depends:       base                 >=4.6 && <4.8
-                     , ghc                  >=7.4
-                     , optparse-applicative >=0.7
-                     , conduit              >=1.0
-                     , filesystem-conduit   >=1.0
-                     , tagsoup              >=0.13
-                     , Cabal                >=1.16
-                     , text                 >=1.0
-                     , sqlite-simple        >=0.4.5
-                     , process              >=1.1
-                     , system-filepath      >=0.4
-                     , system-fileio        >=0.3
-                     , transformers         >=0.3
+  build-depends:       base                 >=4.6   && <4.8
+                     , ghc                  >=7.4   && <7.9
+                     , optparse-applicative >=0.11  && <0.12
+                     , conduit              >=1.0   && <1.3
+                     , conduit-extra        >=1.1   && <1.2
+                     , tagsoup              >=0.13  && <1.4
+                     , Cabal                >=1.16  && <1.21
+                     , text                 >=1.0   && <1.3
+                     , sqlite-simple        >=0.4.5 && <0.5
+                     , process              >=1.1   && <1.3
+                     , system-filepath      >=0.4   && <0.5
+                     , system-fileio        >=0.3   && <0.4
+                     , transformers         >=0.3   && <0.5
+                     , exceptions           >=0.6   && <0.7
+                     , resourcet            >=1.1   && <1.2
+                     , mtl                  >=2.0   && <2.2
   if impl(ghc >= 7.8)
-    build-depends:     haddock              >=2.14
+    build-depends:     haddock-api          >=2.15
   else
     build-depends:     haddock              >=2.13 && <2.14
 
