added code to write upload task to disk
merged heads