Fix error throwing if file empty
Merge pull request #1 from ginsee2/patch-1

Fix error throwing if file empty