added print_error statements