move blobstore operations inside try block to ensure closure.