Close log before execing program to avoid leaving a socket open.