Fix race in file deletion

Hey! Fixed a race in the file deletion callback (it was getting into the success callback without `result` being set yet and thus failing)