Handle correctly to void duplicate thumbnails (see #10225)
Review error handling when creating thumbnail after import

Make sure the error is logged in.
Merge pull request #631 from jburel/thumbnails

Handle correctly duplicate thumbnails (see #10225)