Added debug messages to understand better the thumbnails problem.