Added exception handling for an upload failure