diff file implementation