avoid writing the generated source file twice