handling diff errors