use logger for print_error