Minor cleanups and error handling for app_dial #6935 (casper)