close the session on all file operations