More debug logging inside the layers.utils.create_thumbnail function