Fixed an issue where errors during the upload process weren't being logged correctly.