Test for empty file error

Fixes the issue on empty  files I posted