Fix crash in core/file.c when loading empty files