guard against empty files