The planning of many R&D and new product development projects highly depends on the level of uncertainty at the initial stages of the project, while the project's success depends on how the associated risks of uncertainty are addressed during the project life. This paper aims to develop an incentive contract for the project manager when outsourcing to a risky contractor whose delivery outcome is subject to quality risk. To reduce the likelihood of failure, the contractor can invest in a costly process improvement effort, however, the cost of such an effort is private information for the contractor, which results in adverse selection problem. Moreover, the contractor's decision on process improvement is also unobservable to the project manager, which results in moral hazard problem. We first obtain the first-best solution, and then solve for the second-best optimal cost plus incentive fee contract under full information asymmetry. Our comparative study between the first- and second-best contracts enables us to characterize the efficiency loss due to underinvestment by the high-cost contractor and information rent extracted by the low-cost contractor.