diff --git a/CLI.hs b/CLI.hs
new file mode 100644
--- /dev/null
+++ b/CLI.hs
@@ -0,0 +1,20 @@
+-- | This module facilitates definition of command line interface.
+module CLI (
+    defaultOutputFilename
+  , withFileOrHandle
+  ) where
+
+import           System.IO                 (withFile, stdin, stderr, stdout, IOMode(..), Handle)
+
+-- | Default output filname is used, when there is no explicit output file path, or it is "-" (stdout).
+defaultOutputFilename :: FilePath
+defaultOutputFilename = "JSONTypes.hs"
+
+-- | Generic function for opening file if the filename is not empty nor "-",
+--   or using given handle otherwise (probably stdout, stderr, or stdin).
+-- TODO: Should it become utility function?
+withFileOrHandle :: FilePath -> IOMode -> Handle -> (Handle -> IO r) -> IO r
+withFileOrHandle ""   ioMode handle action =                      action handle
+withFileOrHandle "-"  ioMode handle action =                      action handle
+withFileOrHandle name ioMode _      action = withFile name ioMode action 
+
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,10 +1,10 @@
-Copyright (c) 2014, Michal J. Gajda
-
-All rights reserved.
-
 This repository contains some test JSON examples in test/*.json
 that is downloaded from Twitter API and http://www.jquery4u.com/json/.
 Naturally these are covered by other licenses.
+
+Code copyright (c) 2014, Michal J. Gajda
+
+All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/json-autotype.cabal b/json-autotype.cabal
--- a/json-autotype.cabal
+++ b/json-autotype.cabal
@@ -1,6 +1,6 @@
 -- Build information for the package.
 name:                json-autotype
-version:             0.2.1.0
+version:             0.2.1.1
 synopsis:            Automatic type declaration for JSON input data
 description:         Generates datatype declarations with Aeson's "FromJSON" instances
                      from a set of example ".json" files.
@@ -43,6 +43,7 @@
                        Data.Aeson.AutoType.Util
                        Data.Aeson.AutoType.Extract
                        Data.Aeson.AutoType.Format
+                       CLI
   other-extensions:    TemplateHaskell,
                        ScopedTypeVariables,
                        OverloadedStrings,
