diff --git a/youtube.inc b/youtube.inc
index d58ec7c..e7878e9 100644
--- a/youtube.inc
+++ b/youtube.inc
@@ -83,60 +83,59 @@ function youtube_get_dimensions($size = NULL, $width = NULL, $height = NULL) {
 /**
  * Retreve youtube thumbnail image via YouTube API.
  *
- * TODO add error messaging if something goes wrong, and return FALSE.
- *
  * @param $id
  *   The video_id of the particular YouTube video.
  * @param $force_small
  *   When TRUE, this function should return the standard size image regardless
  *   of what the youtube_thumb_hires variable is set to. This is used should
  *   the high resolution image be found to not exist for a particular video.
+ *
+ * Returns either the Drupal $file object of saved image, or FALSE if image save failed
  */
 function youtube_get_remote_image($id = NULL, $force_small = FALSE) {
-  // This variable is TRUE when higher resolution thumnbails should be saved.
-  // The only thumbnail resolution higher than the standard 480 is
-  // 'maxresdefault'. This resolution image is not guaranteed to exist. After
-  // saving the file, we check to ensure that it does.
+  //maxresdefault, the highest available resolution thumbnail, is not guaranteed
+  //to exist, but we'll check for it first if this setting returns true
   $youtube_thumb_hires = variable_get('youtube_thumb_hires', FALSE);
+  $get_hires = ($youtube_thumb_hires && !$force_small);
 
-  if ($youtube_thumb_hires && !$force_small) {
+  if ($get_hires) {
     $src = youtube_build_remote_image_path($id, 'maxresdefault');
   }
   else {
     $src = youtube_build_remote_image_path($id);
   }
 
-  // Make the actual request to download the file.
-  $image_result = drupal_http_request($src);
-
-  // Assure the youtube thumbnail directory exists.
-  $files = variable_get('file_public_path', conf_path() . '/files');
-  $youtube_dir = variable_get('youtube_thumb_dir', 'youtube');
-  $youtube_path = $files . '/' . $youtube_dir;
-  if (!file_prepare_directory($youtube_path, FILE_CREATE_DIRECTORY) && !mkdir($youtube_path, 0775, TRUE)) {
-    watchdog('youtube', 'Failed to create YouTube thumbnail directory: %dir', array('%dir' => $youtube_path), WATCHDOG_ERROR);
+  //downloads file and saves it as managed Drupal file
+  $image = drupal_http_request($src);
+  if ($image->code != 200) {
+    //silently retry for small image if hires did not exist, otherwise
+    //log and error and return false
+    if ($get_hires) return youtube_get_remote_image($id, TRUE);
+    watchdog('youtube', 'HTTP request for video ID %id failed (error code: %err).',
+      array('%id', $id, '%err', $image->code),
+      WATCHDOG_ERROR);
+    return FALSE;
   }
 
-  // Save the file.
-  $dest = $files . '/' . $youtube_dir . '/' . $id . '.png';
-  file_put_contents($dest, $image_result->data);
-
-  // If the high resolution image was saved but didn't actually exist, a very
-  // small placeholder image from YouTube will have been saved. By checking the
-  // dimensions of this image, we can determine if we saved the placeholder.
-  if ($youtube_thumb_hires && !$force_small) {
-    $image_path = $files . '/' . $youtube_dir . '/' . $id . '.png';
-    if (file_exists($image_path)) {
-      $image_size = getimagesize($image_path);
-      if (empty($image_size[0]) || $image_size[0] < 480) {
-        // We saved the placeholder. Re-run this function with $force_small
-        // set to TRUE. This will give us the standard, guaranteed, thumbnail.
-        youtube_get_remote_image($id, TRUE);
-      }
-    }
+  //set the path to thumbnails, and make sure it's usable
+  $youtube_path = variable_get('youtube_thumb_dir', 'youtube');
+  $youtube_dir = 'public://' . $youtube_path;
+  if (!file_prepare_directory($youtube_dir, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {
+    watchdog('youtube', 'Failed to create YouTube thumbnail directory: %dir', array('%dir' => $youtube_dir), WATCHDOG_ERROR);
+    return FALSE;
+  }
+  $destination = $youtube_dir . '/' . $id . '.jpg';
+  //save the thumbnail and add to Drupal managed files
+  $file = file_save_data($image->data, $destination, FILE_EXISTS_REPLACE);
+
+  if (!$file) {
+    watchdog('youtube',
+      'Unable to save youtube thumbnail to filesystem for video %id',
+      array('%id' => $id),
+      WATCHDOG_ERROR);
   }
 
-  return TRUE;
+  return $file;
 }
 
 /**
@@ -149,18 +148,38 @@ function youtube_thumb_delete_all($form, &$form_state) {
   $youtube_dir = variable_get('youtube_thumb_dir', 'youtube');
   $youtube_path = $files . '/' . $youtube_dir;
 
-  $imagestyleflush = t('Derivatives generated with image styles were not
-    deleted. <a href="@imagestyleflush">Image style flush</a> may help with that.',
-    array('@imagestyleflush' => 'https://www.drupal.org/project/imagestyleflush'));
+  if (!file_prepare_directory($youtube_path)) {
+    return drupal_set_message(t('Youtube thumb directory does not exist!  No files deleted.'));
+  }
 
-  if (file_prepare_directory($youtube_path) && file_unmanaged_delete_recursive($youtube_path)) {
-    drupal_set_message(t('All YouTube Field thumbnail image files have been
-      deleted and will be redownloaded upon the next page load.'));
-    drupal_set_message($imagestyleflush);
+  $files = file_scan_directory($youtube_path, '/^.*\.(jpg|png)$/');
+
+  $legacy_files = false;
+  foreach ($files as $raw_file) {
+    //check if file is being managed by Drupal
+    $uri = $youtube_dir . '/' . $raw_file->filename;
+    $managed_file = db_select('file_managed', 'fm')
+      ->fields('fm')
+      ->condition('uri', '%'. $uri, 'LIKE')
+      ->execute()
+      ->fetchAssoc();
+    if (!$managed_file) {
+      //old files exist before module used managed files, notify user
+      $legacy_files = file_unmanaged_delete($raw_file->uri);
+    } else {
+      $file = file_load($managed_file['fid']);
+      //file_delete invokes hooks to refresh associated image files
+      file_delete($file);
+    }
   }
-  else {
-    drupal_set_message(t('There were no thumbnails to delete.'), 'warning');
-    drupal_set_message($imagestyleflush, 'warning');
+
+  if ($legacy_files) {
+    drupal_set_message(t('Some un-managed files from an older version of the ' .
+      'youtube module were deleted, so their associated' .
+      ' image styles were not deleted. <a href="@imagestyleflush">Image style flush</a>' .
+      ' may help with that.  Alternatively, `drush image-flush` will reset any image ' .
+      ' styles you may be using for youtube thumbnails. New thumbnails will not have this issue.',
+      array('@imagestyleflush' => 'https://www.drupal.org/project/imagestyleflush')));
   }
 }
 
diff --git a/youtube.theme.inc b/youtube.theme.inc
index 3e7763b..4ea6379 100644
--- a/youtube.theme.inc
+++ b/youtube.theme.inc
@@ -111,13 +111,9 @@ function theme_youtube_thumbnail($variables) {
   $id = $variables['video_id'];
   $style = $variables['image_style'];
 
-  // Get YouTube settings - TODO is this needed?
-  $size = variable_get('youtube_size', '420x315');
-  $dimensions = youtube_get_dimensions($size);
-
   $files = variable_get('file_public_path', conf_path() . '/files');
   $youtube = variable_get('youtube_thumb_dir', 'youtube');
-  $dest = $files . '/' . $youtube . '/' . $id . '.png';
+  $dest = $files . '/' . $youtube . '/' . $id . '.jpg';
 
   // Check to see if a thumbnail exists locally.
   if (!file_exists($dest)) {
@@ -137,7 +133,7 @@ function theme_youtube_thumbnail($variables) {
   }
 
   if ($style) {
-    $uri = 'public://' . $youtube . '/' . $id . '.png';
+    $uri = 'public://' . $youtube . '/' . $id . '.jpg';
     $image = theme('image_style', array(
       'style_name' => $style,
       'path' => $uri,
@@ -145,7 +141,7 @@ function theme_youtube_thumbnail($variables) {
     ));
   }
   else {
-    $path = $files . '/' . $youtube . '/' . $id . '.png';
+    $path = $files . '/' . $youtube . '/' . $id . '.jpg';
     $image = theme('image', array('path' => $path, 'alt' => $alt));
   }
 
