use pickle to handle saved document