Added thumbnail generation, fix issue #5