Updated to work with Mega and allows for failed uploads