Add check to protect against zero length files.