Improve program flow.

go vet .
util.go:80: unreachable code
A few things now that I'm looking at it:

- Line 68 should be returning the error `e`
- Line 75 should be returning `n, nil`
- Files not ending with a newline might never have the buffer fully flushed?

Perhaps you could update your pull request? Otherwise I can take on the fixes in the coming weeks.