Updates to deal with outputting export file