Rewrite print_error() func