added the colse-on-exit flag, thus to make children not inherit logfile