modified error printing