Overwriting generated template with custom code