Added function "Save to file" and serialize it