functions to manage a file with Pickle