diff --git a/blobstore/blob_manager.go b/blobstore/blob_manager.go
index <HASH>..<HASH> 100644
--- a/blobstore/blob_manager.go
+++ b/blobstore/blob_manager.go
@@ -60,7 +60,7 @@ func (manager BlobManager) Write(blobID string, reader io.Reader) error {
 
 func (manager BlobManager) GetPath(blobID string, digest boshcrypto.Digest) (string, error) {
 	if !manager.BlobExists(blobID) {
-		return "", bosherr.Error(fmt.Sprintf("Blob '%s' not found", blobID))
+		return "", bosherr.Errorf("Blob '%s' not found", blobID)
 	}
 
 	tempFilePath, err := manager.copyToTmpFile(path.Join(manager.blobstorePath, blobID))
@@ -69,11 +69,11 @@ func (manager BlobManager) GetPath(blobID string, digest boshcrypto.Digest) (str
 	}
 
 	file, err := os.Open(tempFilePath)
-	defer file.Close()
 
 	if err != nil {
 		return "", err
 	}
+	defer file.Close()
 
 	err = digest.Verify(file)
 	if err != nil {
Changed order of file closure to depend on successful open.
Used errorf instead of error followed by sprintf

[#<I>](<URL>)