diff --git a/hspec-stack-rerun.cabal b/hspec-stack-rerun.cabal
--- a/hspec-stack-rerun.cabal
+++ b/hspec-stack-rerun.cabal
@@ -1,5 +1,5 @@
 name:                hspec-stack-rerun
-version:             0.1.0.2
+version:             0.1.0.3
 synopsis:            Simple project template from stack
 description:         Please see README.md
 homepage:            https://github.com/mwotton/hspec-stack-rerun#readme
diff --git a/src/Rerun.hs b/src/Rerun.hs
--- a/src/Rerun.hs
+++ b/src/Rerun.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE RankNTypes          #-}
 {-# LANGUAGE ScopedTypeVariables #-}
 module Rerun where
 
@@ -17,13 +18,11 @@
 --   comes from HSPEC_FAILURES_FILE).
 
 main clientSpec = do
+  logPutStrLn <- getPrinter
 
-  logPrint <- do
-    debug <- lookupEnv "HSPEC_STACK_RERUN_DEBUG"
-    return $ case debug of
-      Nothing -> const $ return ()
-      Just _  -> print
   let
+    logPrint :: Show a => a -> IO ()
+    logPrint = logPutStrLn . show
     -- LAZY IO IS THE DEVIL
     safeReadFile :: FilePath -> IO (Maybe String)
     safeReadFile fs = logAndIgnore Nothing $ do
@@ -74,3 +73,10 @@
       (Just stash,Nothing,Just newset) ->
         writeFile stash newset
       _ -> return ()
+
+getPrinter :: IO (String -> IO ())
+getPrinter = do
+    debug <- lookupEnv "HSPEC_STACK_RERUN_DEBUG"
+    return $ case debug of
+      Nothing -> (\_ -> return ())
+      Just _  -> putStrLn
