An intern is replacing a critical resource midway through a sprint. To help the intern get up to speed, the project manager assigns a senior engineer in the team as the intern's mentor. Two months later, the project goes into critical status, delaying the release milestone by a month.
What should the project manager have done to avoid this scenario?