Added debug wrtieline to show difference in Y value