Some logs to debug, a typo, and a better way to execute child process.