bugfix (crash at shutdown when diagnostics read)
added built-in support for portable_binary_archive