diff --git a/hi.cabal b/hi.cabal
--- a/hi.cabal
+++ b/hi.cabal
@@ -1,5 +1,5 @@
 name:                hi
-version:             0.0.8.1
+version:             0.0.8.2
 synopsis:            Generate scaffold for cabal project
 license:             BSD3
 license-file:        LICENSE
@@ -66,16 +66,16 @@
   hs-source-dirs:
       src
   build-depends:
-        base       == 4.*
+        base          == 4.*
       , bytestring
       , directory
       , filepath
       , parsec
       , process
       , split
-      , template   == 0.2.*
-      , temporary-rc  == 1.2.0.3
-      , text       > 1.0
+      , template      == 0.2.*
+      , temporary-rc  >= 1.2.0.3
+      , text          > 1.0
       , time
 
 executable hi
@@ -113,6 +113,7 @@
       , HUnit
       , bytestring
       , directory
+      , doctest
       , filepath
       , hspec       >= 1.7.2
       , parsec
@@ -122,6 +123,19 @@
       , temporary-rc   == 1.2.0.3
       , text       > 1.0
       , time
+
+test-suite doctests
+  type:
+      exitcode-stdio-1.0
+  ghc-options:
+      -threaded
+  hs-source-dirs:
+      src
+    , test
+  main-is:
+      doctests.hs
+  build-depends:
+      base, doctest >= 0.8, process
 
 source-repository head
   type:     git
diff --git a/src/Hi.hs b/src/Hi.hs
--- a/src/Hi.hs
+++ b/src/Hi.hs
@@ -4,23 +4,25 @@
   , process
   ) where
 
-import           Hi.Directory        (inDirectory)
-import           Hi.FilePath         (rewritePath)
-import qualified Hi.Git              as Git
-import           Hi.Template         (readTemplates)
+import           Hi.Directory             (inDirectory)
+import           Hi.FilePath              (rewritePath)
+import qualified Hi.Git                   as Git
+import           Hi.Template              (readTemplates)
 import           Hi.Types
 import           Hi.Utils
 
 import           Control.Applicative
 import           Control.Monad
-import           Data.List           (isSuffixOf)
-import           Data.Maybe          (fromJust)
-import qualified Data.Text           as T
-import qualified Data.Text.Lazy      as LT
-import           Data.Text.Template  (Context, substitute)
-import           System.Directory    (createDirectoryIfMissing)
-import           System.FilePath     (dropFileName)
-import           System.Process      (system)
+import qualified Data.ByteString          as BS (writeFile, concat)
+import qualified Data.ByteString.Lazy     as LBS (toChunks)
+import           Data.Maybe               (fromJust)
+import qualified Data.Text                as T (pack, unpack)
+import           Data.Text.Encoding       (decodeUtf8)
+import           Data.Text.Lazy.Encoding  (encodeUtf8)
+import           Data.Text.Template       (Context, substitute)
+import           System.Directory         (createDirectoryIfMissing)
+import           System.FilePath          (dropFileName)
+import           System.Process           (system)
 
 -- | Run 'hi'.
 run :: [Option] -> IO ()
@@ -33,15 +35,18 @@
 
 -- |Write given 'Files' to filesystem.
 writeFiles :: Files -> IO ()
-writeFiles = mapM_ (uncurry write)
-  where
-    write :: FilePath -> String -> IO ()
-    write path content = createDirectoryIfMissing True (dropFileName path) >> writeFile path content
+writeFiles = mapM_ write
 
+write :: File -> IO ()
+write f = let path = getFilePath f
+              contents = getFileContents f
+          in createDirectoryIfMissing True (dropFileName path) >>
+               BS.writeFile path contents
+
 -- | Show 'Files' to stdout.
 showFileList :: Files -> IO Files
 showFileList files = do
-    mapM_ (showFile . fst) files
+    mapM_ (showFile . getFilePath) files
     return files
   where
     showFile :: FilePath -> IO ()
@@ -57,11 +62,11 @@
 process :: [Option] -> Files -> Files
 process options = map go
   where
-    go (path, content) = if ".template" `isSuffixOf` path
-                           then (rewritePath' path, substitute' content)
-                           else (rewritePath' path, content)
+    go (TemplateFile path content) = TemplateFile (rewritePath' path) (substitute' content)
+    go (RegularFile  path content) = RegularFile  (rewritePath' path) content
     rewritePath'     = rewritePath options
-    substitute' text = LT.unpack $ substitute (T.pack text) (context options)
+    substitute' text = BS.concat . LBS.toChunks . encodeUtf8 $
+                        substitute (decodeUtf8 text) (context options)
 
 -- | Return 'Context' obtained by given 'Options'
 context :: [Option] -> Context
diff --git a/src/Hi/Git.hs b/src/Hi/Git.hs
--- a/src/Hi/Git.hs
+++ b/src/Hi/Git.hs
@@ -5,9 +5,6 @@
     , expandUrl
     ) where
 
-import           Hi.Types
-import           Hi.Utils
-
 import           Control.Applicative
 import           Data.List           (isPrefixOf)
 import           System.Exit         (ExitCode)
diff --git a/src/Hi/Template.hs b/src/Hi/Template.hs
--- a/src/Hi/Template.hs
+++ b/src/Hi/Template.hs
@@ -1,6 +1,7 @@
 module Hi.Template
     (
-      readTemplates
+      isTemplate
+    , readTemplates
     , untemplate
     ) where
 
@@ -8,6 +9,10 @@
 import qualified Hi.Git              as Git
 import           Hi.Types
 
+import           Control.Applicative ((<$>))
+
+import qualified Data.ByteString     as BS (readFile)
+import           Data.List           (isSuffixOf)
 import           Data.List.Split     (splitOn)
 
 -- | Read templates in given 'FilePath'
@@ -17,8 +22,19 @@
         -- TODO Handle error
         _ <- Git.clone $ Git.expandUrl repo
         paths <- Git.lsFiles
-        contents <- mapM readFile paths
-        return $ zip paths contents
+        mapM fetchFile paths
+
+fetchFile :: FilePath -> IO File
+fetchFile fp | isTemplate fp = TemplateFile fp <$> BS.readFile fp
+             | otherwise     = RegularFile  fp <$> BS.readFile fp
+
+-- | Determine if a given filepath is a template file based on its extension
+-- >>> isTemplate "Example.hs.template"
+-- True
+-- >>> isTemplate "NotATemplate.hs"
+-- False
+isTemplate :: FilePath -> Bool
+isTemplate = isSuffixOf ".template"
 
 -- | Remove \".template\" from 'FilePath'
 untemplate :: FilePath -> FilePath
diff --git a/src/Hi/Types.hs b/src/Hi/Types.hs
--- a/src/Hi/Types.hs
+++ b/src/Hi/Types.hs
@@ -4,11 +4,16 @@
     ( Label
     , Option(..)
     , Mode(..)
+    , File(..)
     , Files
     , Error
     ) where
 
-type Files = [(FilePath, String)]
+import Data.ByteString (ByteString)
+
+data File = TemplateFile { getFilePath :: FilePath, getFileContents :: ByteString } | RegularFile { getFilePath :: FilePath, getFileContents :: ByteString }
+
+type Files = [File]
 
 type Error = String
 
diff --git a/src/Hi/Version.hs b/src/Hi/Version.hs
--- a/src/Hi/Version.hs
+++ b/src/Hi/Version.hs
@@ -4,4 +4,4 @@
     ) where
 
 version :: String
-version = "0.0.8.1"
+version = "0.0.8.2"
diff --git a/test/doctests.hs b/test/doctests.hs
new file mode 100644
--- /dev/null
+++ b/test/doctests.hs
@@ -0,0 +1,5 @@
+import           Control.Applicative
+import           System.Process
+import           Test.DocTest
+
+main = doctest =<< lines <$> readProcess "git" ["ls-files", "src"] []
