Define prog before using it.