convert smat to bin file