diff --git a/apiary-purescript.cabal b/apiary-purescript.cabal
--- a/apiary-purescript.cabal
+++ b/apiary-purescript.cabal
@@ -1,5 +1,5 @@
 name:                apiary-purescript
-version:             1.3.0
+version:             1.3.1
 synopsis:            purescript compiler for apiary web framework.
 description:
   example: <https://github.com/philopon/apiary/blob/master/examples/pureScript.hs>
@@ -20,11 +20,10 @@
   exposed-modules:     Web.Apiary.PureScript
   other-modules:       Web.Apiary.PureScript.Internal
   build-depends:       base                 >=4.6   && <4.8
-                     , apiary               >=1.1   && <1.4
+                     , apiary               >=1.2   && <1.4
                      , purescript           >=0.6   && <0.7
 
                      , filepath             >=1.3   && <1.4
-                     , utf8-string          >=0.3   && <0.4
                      , text                 >=1.1   && <1.3
                      , bytestring           >=0.10  && <0.11
                      , unordered-containers >=0.2   && <0.3
diff --git a/src/Web/Apiary/PureScript/Internal.hs b/src/Web/Apiary/PureScript/Internal.hs
--- a/src/Web/Apiary/PureScript/Internal.hs
+++ b/src/Web/Apiary/PureScript/Internal.hs
@@ -8,11 +8,10 @@
 module Web.Apiary.PureScript.Internal where
 
 import qualified System.FilePath.Glob as G
-import qualified System.IO.UTF8 as U
 
 import qualified Language.PureScript as P
 
-import Control.Monad.Apiary.Action(ActionT, contentType, string, bytes)
+import Control.Monad.Apiary.Action(ActionT, contentType, appendString, appendBytes, string, bytes)
 import Control.Exception(Exception, throwIO, try)
 import Control.Applicative((<$>))
 
@@ -71,7 +70,7 @@
 compile :: PureScriptConfig -> FilePath -> IO String
 compile opt p = do
     mods <- G.globDir (libraryPatterns opt) (libraryBaseDir opt)
-        >>= mapM (\f -> (f,) <$> U.readFile f) . (p:) . concat . fst
+        >>= mapM (\f -> (f,) <$> readFile f) . (p:) . concat . fst
     case P.parseModulesFromFiles id $ ("prelude", P.prelude) : mods of
         Left l   -> throwIO (ParseError l)
         Right ms -> case P.compile (pureScriptOptions opt) (map snd ms) (pureScriptPrefix opt) of
@@ -93,10 +92,10 @@
     case s of
         Right r -> string r
         Left  e | development (pscConfig env) -> do
-            bytes "console.log(\""
-            string $ pr (e :: PureScriptException)
-            bytes "\")"
-                | otherwise -> bytes "console.log(\"PureScript error.\");"
+            bytes "console.error(\""
+            appendString $ pr (e :: PureScriptException)
+            appendBytes "\")"
+                | otherwise -> bytes "console.error(\"PureScript error.\");"
   where
     pr = concatMap esc . show
     esc '"'  = "\\\""
