Fixed session saving file handling