reports error for empty files

bugfix for issue #1