fix critical bug with empty files
0.3.1