Prevent ArgumentOutOfRangeException for emtpy files
Merge pull request #1436 from khellang/patch-2

Prevent ArgumentOutOfRangeException for emtpy files