save function has bug, lopen not test yet