check for empty file.
Merge pull request #236 from asi/master

avoid exception on empty content.