Support custom save function