added option if export should be persisted on exit or not
added more tests for export