diff --git a/html2gmi.go b/html2gmi.go
index 1bfb69c..4e0de52 100644
--- a/html2gmi.go
+++ b/html2gmi.go
@@ -56,16 +56,15 @@ func getInput() (string, error) {
info, err := os.Stdin.Stat()
check(err)
- if info.Mode()&os.ModeNamedPipe != 0 {
+ if *input != "" {
+ //get the input file from the command line
+ dat, err := ioutil.ReadFile(*input)
+ check(err)
+ inputHtml = string(dat)
+ } else if info.Mode()&os.ModeNamedPipe != 0 {
// we have a pipe input
inputHtml = readStdin()
- } else if *input != "" {
- //get the input file from the command line
- dat, err := ioutil.ReadFile(*input)
- check(err)
- inputHtml = string(dat)
-
} else {
//we shouldn't get here
return "", errors.New("invalid option for input - use -i or pipe to stdin")