Add exceptions on empty file and on size = 0.