Added functionality for resuming uploads after shutdown.