fix problem with featured image (previous commit) and add debug log