Some minor improvements about error printing.