Handle empty files, invalid attributes