add option to run command directly and log to a file