Over-zealously removed necessary if statement in awk script