Index: apps.manifest.inc
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- apps.manifest.inc	(revision c435c957d2c5196d21a7347f38db49b4e9855f6e)
+++ apps.manifest.inc	(revision )
@@ -264,12 +264,16 @@
       $current->title = $title ? $title : '';
       $current->alt = $alt ? $alt : $title;
       return $current;
+    } else {
+        // TODO delete managed file object
+        file_unmanaged_delete($current->uri);
     }
   }
    
   $request = drupal_http_request($url, array(), 'GET');
 
-  if (isset($request->data)) {
+  // TODO check response is actually an image
+  if (isset($request->data) && $request->code == '200') { // to avoid 404 status where image haven't been found
     if (!file_exists(drupal_realpath(file_build_uri('apps')))) {
       drupal_mkdir(file_build_uri('apps'));
     }
