tidy up the file in Session plugin