Add exception handling to exporter