this should be a loop, and take into consideration InterruptedException (it should be the mean to stop the exportation process).