This is a better way of doing it.

The only time this will fail is when the file is long.MaxValue, and that
is a damn big file!