Add --output option to redirect output.