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

avoid exception on empty content.
Merge branch 'master' into v1.0