mutex for saveData