Cleanup and implement file removal when undoing code generation.