error checking when exporting.