Modified exception handling for thumbnails