Attach generated code