setup for erialization on program exit