diff --git a/app/Main.hs b/app/Main.hs
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -490,6 +490,7 @@
                     >-> PT.toHandle hOut
 
     -- Finish up by closing file if written
+    unless (null . input $ opts) (IO.hClose hIn)
     unless (null . output $ opts) (IO.hClose hOut)
 
 -- Legacy function
diff --git a/modify-fasta.cabal b/modify-fasta.cabal
--- a/modify-fasta.cabal
+++ b/modify-fasta.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                modify-fasta
-version:             0.8.1.2
+version:             0.8.1.3
 synopsis:            Modify fasta (and CLIP) files in several optional ways
 -- description:         
 homepage:            https://github.com/GregorySchwartz/modify-fasta
