third main file that coalesces firstpass and secondpass through a try loop