support lua document for save/load