optimize reading and using of .brand and .machine files