added error handling for session dump of non-utf8 characters
fixed cluster sorting