Merge "Remove generated file if compiling the image failed."