Add some debugging statements. Debug predicted write_origin() routine.