generate merge file