added exec() option to split stdout and stderr