mod: close files on early return
cgame: close file before error
cgame: close file before error
cgame: BG_NUM_ITEMS fixed, unused code removal refs #52