Fix: bad file descriptor for logfile in cmsrunproxy