diff --git a/smap.cabal b/smap.cabal
--- a/smap.cabal
+++ b/smap.cabal
@@ -1,108 +1,104 @@
 cabal-version: 1.12
-
--- This file has been generated from package.yaml by hpack version 0.31.1.
---
--- see: https://github.com/sol/hpack
---
--- hash: eebcc4a069717374c35cac6f5dcc29bc7758efd8ef0ad6413d9329cdb1964261
-
-name:           smap
-version:        0.3.2
-synopsis:       A command line tool for working with sets and maps
-description:    Please see the README below or on GitHub at <https://github.com/wyager/smap>
-category:       Text
-homepage:       https://github.com/wyager/smap#readme
-bug-reports:    https://github.com/wyager/smap/issues
-author:         Will Yager
-maintainer:     will@yager.io
-copyright:      2019 Will Yager
-license:        BSD3
-license-file:   LICENSE
-build-type:     Simple
+name: smap
+version: 0.3.3
+license: BSD3
+license-file: LICENSE
+copyright: 2019 Will Yager
+maintainer: will@yager.io
+author: Will Yager
+homepage: https://github.com/wyager/smap#readme
+bug-reports: https://github.com/wyager/smap/issues
+synopsis: A command line tool for working with sets and maps
+description:
+    Please see the README below or on GitHub at <https://github.com/wyager/smap>
+category: Text
+build-type: Simple
 extra-source-files:
     README.md
     ChangeLog.md
 
 source-repository head
-  type: git
-  location: https://github.com/wyager/smap
+    type: git
+    location: https://github.com/wyager/smap
 
 library
-  exposed-modules:
-      Smap.Commands
-      Smap.Flags
-  other-modules:
-      Paths_smap
-  hs-source-dirs:
-      src
-  default-extensions: TupleSections RankNTypes ScopedTypeVariables LambdaCase BangPatterns KindSignatures DataKinds OverloadedStrings
-  ghc-options: -O2 -Wall -fexpose-all-unfoldings -optP-Wno-nonportable-include-path
-  build-depends:
-      attoparsec
-    , base >=4.7 && <5
-    , bytestring
-    , hashable
-    , memory
-    , mmorph
-    , optparse-applicative
-    , resourcet
-    , streaming
-    , streaming-bytestring
-    , strict
-    , text
-    , transformers
-    , unordered-containers
-  default-language: Haskell2010
+    exposed-modules:
+        Smap.Commands
+        Smap.Flags
+    hs-source-dirs: src
+    other-modules:
+        Paths_smap
+    default-language: Haskell2010
+    default-extensions: TupleSections RankNTypes ScopedTypeVariables
+                        LambdaCase BangPatterns KindSignatures DataKinds OverloadedStrings
+    ghc-options: -O2 -Wall -fexpose-all-unfoldings
+                 -optP-Wno-nonportable-include-path
+    build-depends:
+        attoparsec >=0.13.2.2 && <0.14,
+        base >=4.7 && <5,
+        bytestring >=0.10.8.2 && <0.11,
+        hashable >=1.2.7.0 && <1.3,
+        memory >=0.14.18 && <0.15,
+        mmorph >=1.1.3 && <1.2,
+        optparse-applicative >=0.14.3.0 && <0.15,
+        resourcet >=1.2.2 && <1.3,
+        streaming >=0.2.2.0 && <0.3,
+        streaming-bytestring >=0.1.6 && <0.2,
+        strict >=0.3.2 && <0.4,
+        text >=1.2.3.1 && <1.3,
+        transformers >=0.5.6.2 && <0.6,
+        unordered-containers >=0.2.9.0 && <0.3
 
 executable smap
-  main-is: Main.hs
-  other-modules:
-      Paths_smap
-  hs-source-dirs:
-      app
-  default-extensions: TupleSections RankNTypes ScopedTypeVariables LambdaCase BangPatterns KindSignatures DataKinds OverloadedStrings
-  ghc-options: -rtsopts -Wall -O2 -fspecialize-aggressively -optP-Wno-nonportable-include-path
-  build-depends:
-      attoparsec
-    , base >=4.7 && <5
-    , bytestring
-    , hashable
-    , memory
-    , mmorph
-    , optparse-applicative
-    , resourcet
-    , smap
-    , streaming
-    , streaming-bytestring
-    , strict
-    , text
-    , transformers
-    , unordered-containers
-  default-language: Haskell2010
+    main-is: Main.hs
+    hs-source-dirs: app
+    other-modules:
+        Paths_smap
+    default-language: Haskell2010
+    default-extensions: TupleSections RankNTypes ScopedTypeVariables
+                        LambdaCase BangPatterns KindSignatures DataKinds OverloadedStrings
+    ghc-options: -rtsopts -Wall -O2 -fspecialize-aggressively
+                 -optP-Wno-nonportable-include-path
+    build-depends:
+        attoparsec >=0.13.2.2 && <0.14,
+        base >=4.7 && <5,
+        bytestring >=0.10.8.2 && <0.11,
+        hashable >=1.2.7.0 && <1.3,
+        memory >=0.14.18 && <0.15,
+        mmorph >=1.1.3 && <1.2,
+        optparse-applicative >=0.14.3.0 && <0.15,
+        resourcet >=1.2.2 && <1.3,
+        smap -any,
+        streaming >=0.2.2.0 && <0.3,
+        streaming-bytestring >=0.1.6 && <0.2,
+        strict >=0.3.2 && <0.4,
+        text >=1.2.3.1 && <1.3,
+        transformers >=0.5.6.2 && <0.6,
+        unordered-containers >=0.2.9.0 && <0.3
 
 test-suite smap-test
-  type: exitcode-stdio-1.0
-  main-is: Spec.hs
-  other-modules:
-      Paths_smap
-  hs-source-dirs:
-      test
-  default-extensions: TupleSections RankNTypes ScopedTypeVariables LambdaCase BangPatterns KindSignatures DataKinds OverloadedStrings
-  ghc-options: -rtsopts
-  build-depends:
-      attoparsec
-    , base >=4.7 && <5
-    , bytestring
-    , hashable
-    , memory
-    , mmorph
-    , optparse-applicative
-    , resourcet
-    , smap
-    , streaming
-    , streaming-bytestring
-    , strict
-    , text
-    , transformers
-    , unordered-containers
-  default-language: Haskell2010
+    type: exitcode-stdio-1.0
+    main-is: Spec.hs
+    hs-source-dirs: test
+    other-modules:
+        Paths_smap
+    default-language: Haskell2010
+    default-extensions: TupleSections RankNTypes ScopedTypeVariables
+                        LambdaCase BangPatterns KindSignatures DataKinds OverloadedStrings
+    ghc-options: -rtsopts
+    build-depends:
+        attoparsec >=0.13.2.2 && <0.14,
+        base >=4.7 && <5,
+        bytestring >=0.10.8.2 && <0.11,
+        hashable >=1.2.7.0 && <1.3,
+        memory >=0.14.18 && <0.15,
+        mmorph >=1.1.3 && <1.2,
+        optparse-applicative >=0.14.3.0 && <0.15,
+        resourcet >=1.2.2 && <1.3,
+        smap -any,
+        streaming >=0.2.2.0 && <0.3,
+        streaming-bytestring >=0.1.6 && <0.2,
+        strict >=0.3.2 && <0.4,
+        text >=1.2.3.1 && <1.3,
+        transformers >=0.5.6.2 && <0.6,
+        unordered-containers >=0.2.9.0 && <0.3
diff --git a/src/Smap/Commands.hs b/src/Smap/Commands.hs
--- a/src/Smap/Commands.hs
+++ b/src/Smap/Commands.hs
@@ -106,8 +106,8 @@
     (toStrict . toLazyByteString . word64HexFixed)
  where
   valuesOnly (_k :!: v) = P.yield (Right v)
-  separateFiles k2bs (k :!: v) = P.yield (Left (k2bs k)) >> P.yield (Right v)
   sameFile k2bs (k :!: v) = P.yield (Right (k2bs k)) >> P.yield (Right v)
+  separateFiles k2bs (k :!: v) = P.yield (Left (k2bs k)) >> P.yield (Right v)
   outputUsing k2bs = case output of
     UnKeyed     hdl -> splitWith valuesOnly hdl hdl
     Interleaved hdl -> splitWith (sameFile k2bs) hdl hdl
