It only gets deleted from this function when there is an error generating it.