better logging, changed taget to classification in ans_to_dict().