Fix the handling of empty files.