Fix the bug:
NA was returned when hitting 'Cancel' to remain the exporting directory