Fix nil error for empty files
Merge pull request #5 from TimothyKlim/master

Fix nil error for empty files