Better handling of final results when running from command line.