fix totally wrong logging, resulting in wpdb errors and stuff