Altered printing diff to handle empty lines correctly