Add usage for exec and copy exec output to the log file