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 #650 from jburel/rebased/dev_4_4/thumbnails

Handle correctly duplicate thumbnails (see #10225) (rebased onto dev_4_4)