diff --git a/HsImport/ImportSpec.hs b/HsImport/ImportSpec.hs
--- a/HsImport/ImportSpec.hs
+++ b/HsImport/ImportSpec.hs
@@ -36,12 +36,14 @@
    | otherwise = do
       result <- parseFile $ Args.inputSrcFile args
       case result of
-           HS.ParseOk modul -> return $ Right $
+           Right (HS.ParseOk modul) -> return $ Right $
               ImportSpec (Args.inputSrcFile args) modul
                          (Args.moduleName args) symbolName
                          qualifiedName saveToFile
 
-           HS.ParseFailed srcLoc error -> return $ Left (show srcLoc ++ error)
+           Right (HS.ParseFailed srcLoc error) -> return $ Left (show srcLoc ++ error)
+
+           Left error -> return $ Left error
 
    where
       symbolName =
diff --git a/hsimport.cabal b/hsimport.cabal
--- a/hsimport.cabal
+++ b/hsimport.cabal
@@ -1,5 +1,5 @@
 Name:          hsimport
-Version:       0.2.2
+Version:       0.2.3
 License:       BSD3
 License-file:  LICENSE
 Author:        Daniel Trstenjak
