two usefull function able to save an object and load it to/from a file