make do_exec close files if opened