uploadFileHelper now uses a single try/catch/finally