* [emulator] Fix mitigated child process handling * reuse * [log] log to file for CLI and fix some issues