The disappointment had its benefits because it spurred him to write the Oscar-winning 1997 film Good Will Hunting with his pal Ben Affleck.