added proper thumbnail file extensions + fixed thumbnail duplication bug