add error catching and logging to file export section