Writte cert file and sn is ok